The best time to visit Nainital is from March until June and again in September-October. In May and June, the town usually gets very crowded due to the rush of tourists escaping the hot summer of the plains, but the temperatures are cool and in the range of 30 degrees C during the daytime. If you plan on visiting Nainital at this time be aware that hotels get sold out soon so it would be advisable to make your hotel bookings well in advance.
In July and August the rains come down heavy and are somewhat of a dampener, so it may be best to avoid Nainital at this time.
In September again the climate is good for a visit. The tourist crowd will have thinned down so if you plan your visit in September and October it will be a good time to visit Nainital. An Autumn Festival is organised at Nainital in October.
November sees winter slowly creeping up. It is still pleasant but night temperatures start dropping. At the height of winter December – January it can get freezing. The upside though is that hotels offer very good rates so if you do plan on a winter trip to Nainital you will get a good hotel price!