IMPORTANT: Some data, image or video may be from 2013 or before.
To decide when to go to Cusco, you have to take into account mainly the weather, and also whether it is high or low season.
The climate has two very different and marked seasons. The dry season extends from May to September, and the tendency is for sunny and clear days (I say tendency because there can be rain). The wet months, on the other hand, run from November to March, when rainfall, some of it heavy, is frequent. If in addition to visiting the city you are going to visit other places (such as Machu Picchu), you should consider that in January and February some roads may be impassable due to the rains and even some accesses may be closed for some days for safety reasons.
On the other hand, from June to August is high season, and it is common to find many tourists in the different attractions inside and outside the city. If you want to take a tour of the sites with few people, it's best to go early, before 10-11am, when organised groups and large numbers of people start arriving. Another important issue if you go in high season and want to visit certain places outside the city, is to try to make some reservations in advance to avoid being left without a place, especially with regard to train tickets and entrance tickets to Machu Picchu.