Map from Google - Stuttgart

In Stuttgart, capital of the state of Baden-Württemberg, in southwestern Germany, the climate is slightly continental, with cold (but not freezing) winters, and mild or pleasantly warm summers. The city is located in an area that would be the mildest of Germany, at least in the summer months, but the location is offset by the altitude which is slightly higher than the plain (250 metres, while the airport is located at about 400 metres above sea level, near Filderstadt), and also by the proximity of the Black Forest.
The average temperature in January is 0,5 °C, while in July it's 19 °C.
Here are the average temperatures.
Stuttgart average temperatures
Stuttgart J F M A M J J A S O N D
Min (°C) -3 -2 1 4 8 11 13 13 9 5 1 -2
Max (°C) 4 5 10 14 19 22 24 24 20 14 8 4

Precipitation is not very abundant, about 720 millimetres per year, but it is quite common and well distributed throughout the year; however the rainiest season is summer, while the least rainy is winter. Rainfall often occurs in the form of short shower or drizzle, whereas during the summer, thunderstorms can break out in the afternoon.
Here is the average precipitation.
Average precipitation Stuttgart
Stuttgart J F M A M J J A S O N D Year
Prec. (mm) 40 35 50 50 85 85 85 70 55 60 50 50 720
Days 10 8 10 10 12 11 11 10 9 10 9 9 118

Winter, from December to February, is cold: the daytime temperatures are on average a few degrees above freezing, and at night they stay around freezing.
However, different weather situations may occur.
When the westerlies blow, the temperatures can be quite mild, and can reach 10/12 °C, but there may be wind and rain.
In anticyclonic days, the weather is cold, the sky is gray and there may be fog.
On the contrary, when the city is reached by cold air masses from Russia, the temperature drops below freezing, for longer or shorter periods, even during the day. The temperature rarely drops below -15 °C, however, it can do it in colder periods, which in the past were more frequent (here are some values recorded in the past: January 1942: -23 °C; January 1947: -19 °C; February 1956: -25 °C; February 1963: -20 °C; January 1979: -17 °C; February 1985: -25 °C; February 1986: -20 °C; January 1987: -25.5 °C, February 1991: -18 °C).
Snowfalls in Stuttgart are quite frequent, though usually not abundant, and occur in the form of sleet or light snow, sometimes however snow can accumulate on the ground, and last for many days.

Spring, from March to May, is initially cold, with possible snowfalls still in March, and then it gradually becomes milder in April and May, although some cold days, with highs around 10 °C, can occur also in May, especially in the first half of the month. However, April and May are, albeit to a small extent, the sunniest months.
Typically, in the second half of May the temperatures become permanently acceptable, and there can be the first pleasantly warm days, with highs around 25 °C or even above.

Summer, from June to August, is mild; Atlantic disturbances may still pass in this season, bringing cool and rainy days, but there may also be some hot and sunny days, in which the temperature can reach 28/32 °C, however with some risk of afternoon thunderstorms; more rarely the temperature can exceed even 35 °C.

Autumn, from September to November, is initially pleasant, in the first half of September, then it gradually becomes cold, dull and wet. The first night frosts usually occur in November, but sometimes also in October. During calm nights, fog can form.

Stuttgart

The amount of sunshine in Stuttgart is not high in autumn and winter months: the sun rarely shines from October to February, while it goes a bit better in summer: there are on average 7 hours of sunshine per day in June and August, and even 8 in July: for a German city, it's not little.

When to go

The best time to visit Stuttgart runs from mid-May to mid-September, being the mildest of the year. July and August are the warmest months; however, it's better to bring a sweatshirt or sweater, a light jacket and an umbrella, for cool and rainy days.