The Sun light is reflected back by earth. On process of reflecting back the sunlight, the lower layer of troposphere absorbs the most sunlight and upper layer absorbs the least sunlight. So when We ascend to troposphere, we move towards the upper layer of troposphere where sunlight is least absorbed and is colder than lower layer where sunlight is most absorbed