Answer:
The main gases which play an important role in maintaining the temperature of the atmosphere are carbon dioxide and the water vapours. As the altitude increases, the concentration of these gases in the atmosphere decreases (due to gravity), which consequently results in decrease of temperature, which means there is not enough CO2 and water vapours to keep increasing the temperature.
Hope that helps...