Temperatures rise with increasing altitude in the stratosphere. Ozone molecules in the stratosphere absorb ultraviolet radiation coming from the Sun. The energy from the UV radiation is transformed into heat. The heating is most intense near the top of the stratosphere, so that is where the stratosphere is warmest.
Original artwork by Windows to the Universe staff (Randy Russell).