The problem with May-June is that the weather can be iffy - it might be sunny and warm - or it might not, eg this picture shows the Giro d'Italia arriving at the stage finish on 25 May 2013 (altitude a little over 2300m):
It might well be beautiful, but if you have the choice go as late as you can.
I wouldn't worry about the heat so much in July-August - every 1000 metres of altitude means a 6.6 degree temperature fall. So at altitude it might be pleasantly warm while in the valley it's sweltering.
Oh and if you are mountain-biking, depending on where you go, you might find that bike parks and lifts are open in July and August.