Road trip on NH 24 is fine.
NH 87 i.e Rampur - Rudrapur have patches from distance to distance. It is really beautiful out there due to rainy season.
Make sure to carry umbrella , extra clothes , raincoats with you. If possible make time for Naukuchiaatal which is way more beautiful and less crowded than Nainital. You can experience Canoeing and Paragliding in Naukuchiatal.
I think you should avoid travelling to nainital or any other hill stations. coz i remember when i went there in the starting of rainy days the roads were slippery and there were few landslides as well although the road was clear but the fog was too much so we had to stop in-between.
Nainital is as busy as beautiful, so I would recommend you reach there before 11 am to avoid traffic jams. Visit old market and other nearby areas like Bheemtal, and Jim Corbett. Its rainy season so be prepared for it.
Nainital is very well connected by road, driving to Nainital takes 6 to 7 hours. From Delhi, it's 290 km almost, highway driving throughout. NH 24 connects Delhi to Rampur via Hapur.