Here's a better way to describe what happens:
* Thermosphere and exosphere are the first to absorb the Sun's rays, and this causes them to become very hot.
The thermosphere in particular is known for its extremely high temperatures due to the direct absorption of solar radiation.
Let me know if you have any other questions!