Presuming that your roof has been properly installed, the next most important factor to consider is attic ventilation. The best type of ventilation is when cooler air can enter the attic through soffit vents. These vents can be seen from the ground and are located behind the gutters.
The warm air is then vented out through the vents mounted on or near the top of the roof. The other type of venting is commonly found in older homes does not use ridge vents. In these homes the cooler air enters through the soffit vent, and vents out through louvers in the gables on each end of the building.
Without these vents, heat and moisture will build up in the attic area and combine. This combination causes the sheathing (the wood under the shingles) to rot, the shingles to age prematurely and the insulation to lose its effectiveness. A cooler well ventilated attic during the summer will also lower air conditioning bills.