March to June and September to November are best. Spring has pleasant weather and blooming rhododendrons, while autumn has the clearest views of the Dhauladhar range and cold nights.
July and August are monsoon months: the trail is slippery, clouds hide the views and landslides can affect the road. Only go if you are prepared for rain.
December to February brings snow on the upper ridge, colder nights and a tougher climb. It can be beautiful but needs a warm sleeping bag, traction for shoes and ideally a guide. Check weather before setting out.