What determines the temperature of a planet? To a large extent, it
is determined by the distance of the planet from the Sun. How does this
work? Sunlight is absorbed by the planet causing it to heat up. As the
planet gets warmer it starts to glow with its own blackbody radiation.
The warmer it gets, the more it glows. The process stops when the amount
of glowing from the planet balances the amount of heating from the Sun.
When the details are worked it, one finds that planets farther from the
Sun should be cooler than those closer to the Sun.
However, note that the kind of light that the planet emits is not the
same kind of light that is incident on it from the Sun. Since the planet
is cooler than the Sun, it glows predominantly at longer wavelengths,
in the infrared part of the spectrum. So incoming sunlight is predominantly
visible light, but outgoing radiation is predominantly infrared light.