Perpignan gets around 300 days of sun per year and has one of the hottest summer climates in France. July temperatures regularly reach 35-38°C; the heat is dry rather than humid, which makes it more tolerable than the coast further east, but it remains exhausting for walking around monuments in the middle of the day. May, June, and September are the best months for visiting: warm enough to use the Mediterranean beaches without the peak-August crowds and prices that affect the whole Côte Vermeille.
The tramontane wind — a cold, dry, north-westerly — blows hard through the Roussillon plain several times per year, sometimes for days at a stretch. It makes outdoor dining miserable and can turn a pleasant afternoon into an ordeal; it also clears the sky completely, which means the light becomes exceptional and the views to the Pyrenees are at their sharpest. December and January are mild by northern European standards (10-15°C daytime), the city functions normally, and the monuments are largely empty. If you want Perpignan without the crowds and can tolerate the possibility of tramontane, autumn or early winter is a serious option.