You will experience a variety of weather during your trip to Peru. The climate varies from place to place, as the geography is incredibly varied, and the seasons are not entirely predictable, so please take the following as a guide and be prepared for changes in climate.
In Cusco and its environs (including Machu Picchu, the Inca Trail, and the Sacred Valley), the dry season is from May to early November, and the rainy season runs roughly from mid-November to mid-March. The wettest months are January to March. The tourist high season runs from June to September. The Inca Trail is closed in February for maintenance, but can be hiked at any other time of the year. Machu Picchu is at 8,000 feet, and Cusco is at 11,000 feet. At night in Cusco it can drop down into 40s and even 30s during the dry season. During the day temperatures will typically be in the 60s and 70s.
In Lima, the rainy season is from June to September, though in reality it doesn’t often rain. During this same period Lima is often covered in a blanket of mist that is called the “garúa.” For the rest of the year Lima is generally sunny and hot.
In the Amazon jungle of Northern Peru (near Iquitos), temperatures are generally high during the day (in the high 80s) and there is almost always very high humidity and at least some rain (this is a rainforest after all!). There is a high water season from December to May when the average temperate is in the 80s which is slightly cooler than in the dry season. During this time, the water levels increase quite significantly. From June to November is the low water season when temperatures are warmer and average in the 90s during the day. The low water season sees a significant drop in water levels.