The surface of the sun is at roughly 5800 K. The center of the Sun is much hotter than the surface. The surface is cooler because it radiates its heat, and so draws heat out from the center in a manner reminiscent of the greenhouse effect. Very hot objects tend to act as black bodies, and radiate according to Stefan's Law. Even a piece of polished steel will turn black and start to glow when it reaches 2000 K. As a black body at 5800 K, the Sun radiates 64 MW/m2. Its radius is 700,000 km, so its total heat output is 4.0×1026 W.
The Earth orbits the Sun at 150,000,000 km and has radius of 6,400 km. It presents a circular area to the Sun's radiation of 1.3×1014m2 . When it reaches the Earth, the Sun's radiation is spread out across a sphere of the same radius as the Earth's orbit, and so has intensity 1.4 kW/m2. The solar heat absorbed by the earth is 1.8×1017W.
Suppose the Earth itself were a black body. As a black body, it absorbs all heat landing upon it from the Sun. Either it radiates all this heat into space or it doesn't. If it doesn't, it gets warmer. If it gets warmer, it will radiate more heat, according to Stefan's Law. The Earth will eventually get warm enough that it radiates all the heat it absorbs from the Sun. We assume the Earth has already been through this warming process, and is radiating as much heat into space as it receives from the Sun.
The surface area of the Earth is 5.1×1014m2. If the Earth were a black body, it would radiate the solar heat it absorbs when it was at 280 K, or 7°C. In our diagram, we show how all terms in our calculation cancel out, except for the temperature of the Sun, Ts, the radius of the Sun, rs, and the radius of the Earth's orbit, ro, resulting in a simple formula. Using this formula, we also arrive at 280 K for the Earth's radiating surface temperature.
As it is, the average temperature of the Earth's surface is 287 K, or 14°C. At first glance, the Earth appears to behave like a black body. But is it really?
ASIDE: The Sun delivers 1.8×1017W to the Earth, and the Earth's surface area is 5.1×1014m2, so the average power received from the sun at the Earth's surface is 350 W/m2. (Well, its 353 W/m2 with our numbers, but we have rounded to two significant figures.)