Levoča is comfortable from late May to early October. July is the busiest month because of the Marian pilgrimage on the first weekend, when up to half a million people walk up to the basilica on Mariánska Hora — accommodation in the town is fully booked, but the atmosphere is extraordinary if you don't mind the crowds.
For a quieter visit, come in June or September: the weather is good, the days are long, and you can wander the square without bumping into tour groups. Winter is cold (this is the Spiš at 570 m altitude) but the snow makes the old town look like an etching, and it's an easy stopover on a trip to the High Tatras for skiing.