In the stratosphere, temperature increases with altitude. The reason is that the direct heat source for the stratosphere is the Sun. A layer of ozone molecules absorbs solar radiation, which heats the stratosphere. ... The ozone layer is found within the stratosphere at between 15 to 30 km (9 to 19 miles) altitude.
The atmosphere is layered, and these layers correspond with how the atmosphere's temperature changes with altitude. By understanding the way temperature changes with altitude, we can learn a lot about how the atmosphere works. For example, the reason that weather takes place in the lowest layer is that the Earth's surface is the atmosphere's primary heat source. Heating the lowest part of the atmosphere places warm air beneath colder air, an unstable situation that can produce violent weather. Interesting things happen higher in the atmosphere, like the beautiful aurora, which light up the sky with brilliant flashes, streaks and rolls of white or colored light.