Earth’s approximate effective temperature used in greenhouse-effect comparisons is 255 K. This is the temperature Earth would radiate at, on average, if its outgoing energy were represented by a simple effective radiating surface.
The value comes from Earth’s energy balance. The planet absorbs sunlight and emits thermal radiation to space. Applying the Stefan–Boltzmann relationship to the absorbed solar energy gives an effective emission temperature of roughly 255 kelvins, or about −18 °C.
That number is not Earth’s average surface temperature. The global mean surface temperature is approximately 288 K, or about 15 °C. Earth’s atmosphere, especially through water vapour, clouds, carbon dioxide, and other greenhouse gases, absorbs and re-emits infrared radiation. As a result, radiation escaping to space generally comes from higher, colder parts of the atmosphere, while the surface must be warmer to maintain energy balance.
The comparison between 255 K and 288 K is therefore a useful simplified illustration of the greenhouse effect. It is not a prediction of the exact temperature of an airless Earth: real planets have uneven surfaces, atmospheres, clouds, and heat transport.