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 behind the gutters when viewed from the ground. The warm air is vented out through vents mounted on or near the top of the roof.
The other type of venting is commonly found in older homes.
This is where the cooler air enters through the soffit vent, and vents out through louvers in the gables on each end of the building.
Without proper ventilation, heat and moisture will build up in the attic and combine, causing the sheathing to rot, shingles to age prematurely and the insulation to lose its effectiveness.
There should only be two points of ventilation, from a choice of three possibilities (Soffit, Gable, Roof).
Two points of ventilation creates a flow through current that draws air out of the attic, a three point venting system creates a dead space with little or no airflow.
In many cases when home owners insulate attics they do not use dams (made of cardboard or Styrofoam) in the eaves (over the soffit) to stop the insulation from being blown into the cavity and blocking the soffit vents.
Black staining (possibly mold) on the roof decking in the attic are an indication of poor ventilation. Failure to cure this condition could lead to serious health related problems for the occupants of the property.
NOTE: Do not block or cover any attic or roof vents unless you are blocking off third venting sources.