All through the year Nainital has one of the best weather. Summers are warm, while rains are chill and winters are cold. March to June is the best time to visit. You could enjoy boat rides, view peaks, and explore a lot.
I went in October and it was lovely- nice brisk weather for trekking and the trees were super lush and green. We could see the snow capped mountains in the distance also!
Fall and winter (October-March) in Nainital are the best but also if you don't mind rain, monsoon is extremely beautiful too with lush green nature.
Avoid summers as you'd get a lot of crowd.
Well.... if you are going for the jungles and want to capture wildlife, winter is the best time to. else, every season has its own charm. however try to avoid the peak monsoon seasons.