Although it is true that the climate of Cusco varies throughout the year according to seasonal changes, it is also a fact that there are two constants from January to December: if you are under the sun you will get hot - usually during the day -, and if you are under a shade you will get cold - on cloudy days and at night.
Having said that, and to be more specific, the region of Cusco and Machu Picchu is characterized for having the following climate:
December - April
It is the rainy season and the downpours can be given on daily basis. However, it is normal that after the rain comes a bright and clear blue sky, accompanied by an intense sun. The temperature is 16 to 18º C during the day and less than 0º during the night.
May - November
It is the dry and sunny season, where nature blooms and you can enjoy more the outdoor walks. Rains and cloudy days are also present during these months but more sporadically. The average temperature is between 17 and 19º C during the day and in the hours of early morning and night can be less than zero.
The best is to wear layers and have thermal and waterproof clothing to be prepared for any drastic weather changes. Additionally we recommend you to pack sunglasses, cap, sun block, repellent, lip balm and an umbrella.
And if you forget to bring something, do not worry, there are plenty of shops in Cusco.