The atmosphere gets heated up because of the presence of dust particles, gases and water vapour, which trap heat. As we move upwards, the air becomes thinner and the amount of dust particles, gases and water vapour present become less. This implies that less heat is absorbed leading to the reduction in temperature. Thus, a fall in air temperature is witnessed with increasing height.