where F is the solar constant, r is the Earth radius, πr**2 is the cross section of the Earth for catching solar flux, and 4πr**2 is the surface area of the Earth.
Some solar flux is reflected and some is absorbed by the atmosphere.
In absorption, the EMR is destroyed and its energy becomes excitation and/or heat energy of the matter.
The low energy density is the drawback of solar power.
By the 2nd law of thermodynamics, the entropy of the energy must increase overall if you are NOT in thermodynamic equilibrium in closed system. The Earth is NOT a closed system and NOT in thermodynamic equilibrium.
However, entropy in increasing overall, it create even lower-entropy (i.e., more highly ordered) structures: climate, weather, and the biosphere.
Complex interactions allow this.
The structures are NOT only ordered, but very complex---which is a different thing from ordered in physics.
Every bit of energy from the Sun leaves the Earth.
That part which isn't just reflected leaves as relatively high-entropy EMR mostly infrared.
The solar flux has a nearly blackbody spectrum since the Sun approximates a blackbody radiator.
However, the solar flux is reduced in energy by spreading out from the Sun and CANNOT heat an absorbing surface to the photospheric temperature of the Sun which ∼ 5800 K.
As a first approximation, let's say that the Earth absorbs all solar flux and comes to a single temperature. Then the Earth would radiate exactly like blackbody radiator. Using conservation of energy and the Stefan-Boltzmann law we could calculate its single temperature.
If we did the calculation (which we won't), we would get ∼ 5° C (278 K) (see Wikipedia: Greenhouse effect).
A slight variation is to say that the Earth absorbs only the solar flux allowed by its actual albedo (diffuse reflectivity). The Earth Bond albedo (overall Earth albedo) is 0.306, and so the absorption fraction is 0.694.
In this case, we get ∼ -18° C (255 K). (see Wikipedia: Greenhouse effect). This value is probably more suggestive of the true temperature of an real airless Earth since an absolutely zero-albedo airless Earth is unlikely.
To 1st-order, the blackbody-radiator Earth approximations to surface temperatures were NOT bad. On the Kelvin scale, the first is only ∼ 3 % too low and the second is only ∼ 10 % too low.
However, from the perspective of life, the approximate values are significantly low: i.e., chilly.
Well the Earth (now counting the atmosphere) is NOT at a single temperature.
There is temperature gradient that decreases going upward from the Earth's surface.
The surface temperature will arrange itself so that given the solar flux inflow to the surface (≅ 170 W/m**2) and the opacity (effectively thermal insulation in homey terms) of the atmosphere, the outflow of EMR to space exactly balances the inflow.
The important opacity (which is mainly in the infrared) is due mainly to water vapor and secondarily to carbon dioxide (CO_2). There are a few minor helpers (e.g., methane (CH_4)).
If the inflow and outflow of flux are out of balance, then the surface temperature adjust to bring them into balance.
For example, if you increase the opacity, the outflow falls, the surface temperature increases, the temperature gradient to space steepens (i.e., decreases more rapidly), and the outflow rises again to restore the balance.
Note Heat flow increases with steepening temperature gradient as a general rule.
Really, the situation is like heating a house. All the heat flow from a furnace must flow to the outside no matter what. But by increasing the thermal insulation, the inside temperature must rise to maintain the balance of inflow and outflow.
The greenhouse effect is good.
It keeps the average surface temperature well above the chilly temperatures that a blackbody-radiator Earth would give.
But we want the right amount of greenhouse effect which is the amount the biosphere is used to having since ∼ 9000 BCE (i.e., since almost the beginning of Neolithic (c.10,000--c.4500+ BCE) and Holocene (c.10,000 BCE--present) (see Wikipedia: Keeling curve: Mauna Loa measurements).
But humankind has been increasing the atmospheric carbon dioxide (CO_2) since the Industrial Revolution (c.1750) and very rapidly since circa 1960 (see NOAA: Trends in Atmospheric Carbon Dioxide; Wikipedia: Keeling curve: Mauna Loa measurements), and so increasing the greenhouse effect and the average surface temperature.
The increasing average surface temperature could have disastrous effects for the biosphere and humankind.
The energy that powers climate, weather, and the biosphere comes almost entirely from solar flux.
There is some locally significant contributions of geothermal heat flow at points where it is concentrated: e.g., hydrothermal vents, hot springs, and volcanoes.
The deep biosphere (deep subterranean life) obviously depends on geothermal heat flow or it would be too cold for life as we know it.
But we don't worry much about the deep biosphere.
Of course, geothermal heat flow is NOT negligible even if contributes little directly to climate, weather, and the biosphere.
It creates geological structures: e.g., plate tectonics, volcanoes, mountain formation, etc.
Some of geothermal heat flow becomes macroscopic forms of energy to create the structures before being dissipated back to heat energy.
The energy is transferred to the tital motional on Earth, both as the macroscopic energy of sea tides and land tides.
Viscosity and friction turn the energy into heat energy rather rapidly.
The total tidal heat flow is ∼ 0.0074 W/m**2.
The tidal heat flow is about a tenth of geothermal heat flow, and so is mostly insignificant in direct contributions to climate, weather, and the biosphere.
However, the macroscopic energy of the tides which does have an effect coasts, ocean currents, ocean flows in general, weather, and the biosphere.