On a sunny day, you can feel the sun on your face. The warming of your skin in sunlight is actually radiation directly from the sun. We call it “heat,” but it is really heat being transferred via infrared radiation. This energy has come 93 million miles through space, air, and clouds to warm your skin. Virtually none of this energy is lost in space and very little is lost into the air before it reaches your skin. Solar radiation comes in a wide spread of wavelengths, only some of which cause warming. The visible light all around you is nice to have, but it does not warm your skin.
When your skin feels warm in the sun, that warm feeling is not directly related to sunburn. The ultraviolet wavelengths which cause sunburn do not cause warming. You can block the harmful ultraviolet light with sunscreen and still feel the heat. It is remarkable to realize this warming comes from 93 million miles away.