The temperature of a planet's surface (or outer layers of it's atmosphere) will depend on The amount of sunlight received falls off as the inverse square of the distance from the sun, so that a planet fives times further from the Sun than Earth receives 1/25th as much sunlight per unit area of surface.

To determine the temperature from the amount of light, we use the Stefan-Boltzman law:

Flux = sigma x T4
sigma = Stefan-Boltzman constant
T = temperature (degrees Kelvin)
Thus, the temperature is proportional to the fourth root of the flux,
T ~ F1/4