October to March is the best time to visit Varanasi, with November to February the most comfortable and February to March arguably the sweet spot for combining pleasant weather with clearer mornings.
The reasoning is practical. Varanasi's essential experiences — the sunrise boat ride, walking the ghats, the evening aarti, exploring the old city on foot — all depend on being outdoors for extended periods. Between October and March this is comfortable. Between April and June it is punishing, and between July and September the river is high and boats are often not running.
November is particularly good. The weather is settled, the river has receded, and Dev Deepawali — held on the full moon of Kartik, roughly a fortnight after Diwali — sees the entire length of the ghats lit with hundreds of thousands of earthen lamps. It is one of the most spectacular sights in India and draws large crowds.
December and January offer the coolest, clearest air but bring cold mornings and the risk of fog obscuring sunrise. Pack properly for cold; visitors regularly underestimate how cold a 5.30am boat ride in January feels.
Mahashivaratri (February or March) is the major festival at Kashi Vishwanath, given the temple's dedication to Shiva. Enormous crowds and very long queues, but a significant occasion.