With no atmosphere, there are only the incoming solar radiation and outgoing earth infrared radiation to consider. Working under the principle of a system in radiation balance we begin by writing
$F_{Out} = F_{In}$
where $F$ represents the flux of energy in watts. (Recall that a watt is a joule (energy) per second. The expression of energy per time is the same as "power.") The Stefan-Boltzmann formula relates the flux radiance, or emittance $E$ (in watts per square meter), to the temperature $T$ of the body by
$E = \epsilon \sigma T^4$
where $\epsilon$ is the emissivity of the body ( the value is between 0 for nothing like a blackbody and 1 for an object that is truly a blackbody radiator), and $\sigma$ is the Stefan-Boltzmann constant, which is $5.67\times 10^{-8} \frac{W}{m^2K^4}$.
The intensity must be multiplied by the surface area in order to give the flux. The surface area of the incoming solar radiation is a disk with radius equal to that of the earth, as indicated in the figure above. The surface area of the earth, a sphere, must be used for the out-going flux. Using the appropriate formulas for areas we have
$4\pi r^2 \epsilon \sigma T_{earth}^4 = \pi r^2 (1-\alpha)E_{solar}$
The $\alpha$ term in the formula represents the earth's average albedo. The equation above may be solved for $T_{earth}$ to give
$\displaystyle{T_{earth} = \left(\frac{(1-\alpha)E_{solar}}{4\epsilon \sigma}\right)^{1/4}}$
Substituting appropriate values for $\alpha$ (33%), $\epsilon$ (0.99) and $E_{solar}$ (1367), the resulting earth temperature is something like $255^o$ Kelvin, or $-20^o$ Celsius, which is much cooler than the observed temperature of about $15^o$ Celsius. The next step is to include the influence of the earth's atmosphere.
In a one-layer model, the earth's atmosphere is considered to be a single "slab" that selectively absorbs and emits energy. Recall the selectivity is due to the atmosphere not being a good blackbody radiator because of its gaseous nature. The figure below shows the various components in the simple model as well as the various emittances.
The principle of balanced fluxes at each of the component boundaries, along with the Stefan-Boltzmann formula, will be used to determine the temperature of the atmosphere and the earth's surface. Working from the top down, at the atmosphere-outer space boundary we have
$F_{In} = F_{Out}$
which translates to the equation
$\pi r^2 (1-\alpha)E_{solar} = 4\pi r^2 \epsilon \sigma T_{atmos}^4$
where the incoming surface is the disk and the outgoing surface is the sphere, each with radius $r$ of the earth. Note that this equation is identical to the Earth temperature equation without an atmosphere. The result gives an atmospheric temperature of $255^o$ Kelvin. This may be considered to be the "skin" temperature of the earth, or the temperature that would be sensed by a probe stationed just outside the earth's atmosphere.
We continue downward in order to determine the earth's surface temperature. The next constituent boundary to consider is that of the atmosphere. Using the principle of equilibrium again, we have
$F_{In} = F_{Out}^{down} + F_{Out}^{up}$
$4\pi r^2 \epsilon \sigma T_{earth}^4 = 4\pi r^2 \epsilon \sigma T_{atmosphere}^4 + 4\pi r^2 \epsilon \sigma T_{atmosphere}^4$
The surface for both components is the sphere with radius $r$ equal to the earth's radius. The common factors of $4\pi$, $r^2$, $\epsilon$, and $\sigma$ may be divided out to give
$T_{earth}^4 = T_{atmosphere}^4 + T_{atmosphere}^4$
$T_{earth}^4 = 2T_{atmosphere}^4$
$T_{earth} = 2^{1/4}T_{atmosphere}$
The last equation gives the surface temperature of the earth to be $2^{1/4}$ ( = 1.189) times the temperature of the atmosphere. This results in a value of approximately $303^o$ Kelvin, or roughly $26^o$ C. Although this is warmer than the observed average of about $15^o$ C, it is closer than the temperature determined using the no atmosphere scenario.