How can we calculate the temperature of the atmosphere, including the greenhouse effect?
One can account for greenhouse gas effect for Earth's temperature in simple energy balance model in following manner.
Assume that fraction $f$ of longwave radiation emitted by Earth's surface is captured by green house gases in the atmosphere. Suppose Earth's surface temperature is $T_e$ and temperature of the atmosphere is $T_a$. The energy received from Sun should balance as follows
$$\pi {r_e}^2 F_0 (1 - A) = 4 \pi r_e^2 (1-f) \sigma {T_e}^4 + 4 \pi r_e^2  \sigma {T_a}^4 $$
where $F_0$ is solar constant (Energy received from sun per unit area per unit time), A is Earth's albedo, $\sigma$ is StephenBotlzmann constant and $r_e$ is Earth's radius.
Since the black body radiation are isotropic, 50% of radiation emitted by atmosphere travels toward Earth's surface and remaining 50% of radiation travels toward the space. Also, assuming that atmosphere receives all of its energy from Earth's surface through longwave radiation, it gives following energy balance equation
$$f \sigma {T_e}^4 = 2  \sigma {T_a}^4. $$
which leads to
$$ T_a = \sqrt{\sqrt\frac{f}{2}} T_e $$
Nearly 80% of the radiation emitted from Earth's surface is absorbed by greenhouse gases (including water vapour) and clouds. Substituting value of $f$ 0.8 and solving it for $T_e$ will get you the answer you are looking for.
Reference
Chapter 7 The Greeenhouse Effect in Introduction to Atmospheric Chemistry by Daniel Jacob
http://acmg.seas.harvard.edu/people/faculty/djj/book/bookchap7.html