In the layers of the atmosphere , Air temperature differences result mainly because of
Composition of gases
the way solar energy is absorbed through the atmosphere
the further you move up, the fewer molecules
Density decrease with increase in altitude