The city enjoys a Mediterranean climate since it is so close to the sea. Summers in the city can last as long as six months, May through October. Every now and then, you will find temperatures rising over 20 °C during the months of April and November. Winters in the city are mild with temperatures averaging from about 13 °C during the day to about 6 °C at night in the months of December through February.
The best time to visit Nice would be in May or June and also later in September or October. During those times, the weather is still nice minus the crowds of tourists. Take note that during summer, Nice can get quite hot, attract throngs of people, and create traffic in the streets. If you do not mind all that, summertime would be a nice time to visit the city, specifically during July or August.