Trekking is best mostly at the times when it is neither too hot and not too cold. Temperature in Kasol and Manikaran is always best to visit. You can visit these places in any time of the year.
But if you plan to specially trekk in these areas, then there is winter trek- mostly between October to February. And then there is peak season trek that is between March to June- July.
So you can choose your best time and visit and trek in Kasol and Manikaran. Enjoy your trek and visit.