Sassari is a year-round city rather than a beach resort, which means it's worth visiting at any time of year. The best months are May to October, when the weather is warm and the outdoor life is at its most pleasant.
The main festivals are worth timing a visit around. The Cavalcata Sarda (penultimate Sunday of May) is the most spectacular regional folk festival in Sardinia. The Discesa dei Candelieri (14 August) brings the city to a standstill for a candlelit procession to the Church of Santa Maria di Betlem.
Summer (July-August) is hot — temperatures regularly exceed 35°C — and the city empties somewhat as residents head to the coast. The most pleasant time to be in the city itself is May-June and September-October, when the heat is manageable and the streets are full of life.