To maintain a steady temperature, the Earth must be in a state of thermal equilibrium with its environment.
The amount of heat the Earth absorbs from the Sun must equal the amount of heat that the Earth radiates away to space.