Shanghai has a moderate humid subtropical climate and experiences four seasons although not as distinct as in the north. It's characterised by a hot and humid summer, cool autumn, cold and gloomy winter and a warm spring.
Summer in Shanghai lasts from late May or early June to mid September. The city can be very crowded for its the peak season for tourists. The warmth and humidity through out the whole time with a quite fair amount of rainfalls, frequent downpours or freak thunderstorms could make the conditions outdoors uncomfortable. The temperatures could hit 40°C(104 °F) in July and August, with an average of 27°C (80.6°F). Typhoons are also summer frequenter in Shanghai but none of them had caused large damages in the past recent years. An umbrella is a daily neccesity.
Winter starts from early December. It's pretty windy, grey and misty then and the temperature can drop below freezing at nights, but it rarely snows through out the year. You certainly will have better bring warm clothes, such as silk long johns and down jackets with you if you plan to visit here in wintertime.
The best seasons to visit Shanghai are spring, which begins in mid or late March, and autumn starting in late September or early October, which are pleasantly sunny and dry with mild temperatures and much less rainfalls. As well, less crowds than summer time.