Climate in Peru
There are two main seasons in Peru, wet and dry. However, the weather varies greatly depending on the geographical region. You have the Andean mountains and highlands running through the middle of the country, the dry coastal desert along the west of the country and you have the tropical Amazon jungle to the east. In general the overall temperature is mostly influenced by altitude: the higher you go, the cooler it gets.
Andean highlands
May to August is the peak season and coincides with the cooler dry season. This is the best (but also the busiest) time to go trekking. You can visit the highlands and go trekking year-round, although the wettest months from December to March can make it less enjoyable experience. Also, it's worth noting that the Inca trail is closed for the whole of February, for its annual clean up. In Cuzco between September and April the average daytime temperature ranges between 8°c - 20°c degrees and from May to August it's a little cooler at between 2°c - 15°c degrees.
Amazonian jungle
As the name suggests, it rains a lot in the rainforest. The wettest months are December to May, but even then it rarely rains for more than a few hours at a time. The driest months are June to September. But whenever you go, you are likely to encounter a little rain; it's all part of the experience. It's hot and humid all the time and temperatures range between 20°c - 35°c all year round.
Coastal desert plains
December through to March are the hottest and most humid months along the coast, with average temperatures between 20°c - 30°c. The coastal area around much of central Peru including Lima, is shrouded in coastal fog between April to November with temperatures between 15°c and 25°c. The coast rarely sees rain and some parts go years without any rain at all.