The cool Humboldt Current that runs along the Peruvian coast keeps Lima's temperatures fairly mild throughout the year. It can get into the mid 80s F/high 20s C during the summer months of December-March, but for the rest of the year, the temperature rarely goes above 70 F/22 C or below 50 F/10 C. Rain in Lima is almost nonexistent and precipitation is generally confined to the less than 1 in/2.5 cm annually generated by the garua
, a thick mist that penetrates the city during the winter months.
There really is no best time to visit Lima. If you want to surf or visit the beaches to the south, then go in the sunny summer, but the weather is mild and pleasant (if cloudy) year-round. The tourist high season is during the Northern Hemisphere's summer months of May-September, which coincides with Peru's dry season in the Andes and is the best time for camping, trekking and mountaineering.