Why is the sun called a black body?
It definitely is not black. Almost all of the photons of light that the sun produces in its core are absorbed by the sun's thin outer layer, the photosphere. Because it absorbs all the radiation that hits it, the photosphere of our sun and those of other stars behave like black bodies. The gases in the photosphere heat up until they reach a constant temperature. Then the star radiates light that looks a lot like that of a black body .