Fire and sun: transmission of heat As we know there are three well known ways in which heat is transmitted:


*

*conduction

*convection

*radiation


I suppose fire and sun make us warm in the same way: radiation. Of course, near the fire there should be convection and conduction, but about $1$ meter away, heat should be tranferred to our body mainly by IR radiation. 
Questions
Is the previous reasoning correct? 
Then, if heat trasmites mainly through radiation -as in a fire-, but why there is such a difference out of atmosphere if heat comes from radiation?
 A: 
If heat trasmites mainly though radiation, why is colder out of the atmosphere, when we are nearer the sun?

Heat tranmission is different than heat retention. The atmosphere retains the heat to the level that life can exist. It is the so called "green house effect".
The moon which has no atmosphere gets fried in the sun and near zero in the shadow.
Why is the temperature in the green house hotter than outside the green house?
answer:there is no direct convection to remove heat from the greenhouse, the bulk  can just cool by radiation, and inner convection which will transfer heat by conduction to the outside glass  for outside convection. This raises the temperature in the greenhouse with respect to the outside conditions. Same with a closed car where children die when left there in the sun. 

Then, if heat trasmites mainly through radiation

within the atmosphere convection plays a huge role in heat transmission.

-as in a fire-,

Within the atmosphere of the room convection plays a large role in homogenizing temperature. Radiation has to be absorbed by something, transfer kinetic energy to the molecules , to be counted in the average kinetic energy as temperature.

but why there is such a difference out of atmosphere if heat comes from radiation?

Change in heat is connected with a change in temperature, and temperature is defined by the kinetic energy of the molecules.
So objects get hotter when the kinetic energy of the molecules that composes them gets larger.  Out of the atmosphere there are very few molecules to absorb  the radiation and increase their kinetic energy .Heat is energy and in the vacuum of space there are very few molecules to carry any energy.
A: Earth of course has a Greenhouse Effect--where absorbed solar radiation is remitted in the infrared from the surface. That is absorbed by the adjacent layer of atmosphere, which reradiates isotropically, leading to heating of the layer above that, and so on until you get to 1 optical depth from the top, and radiation can escape to space. (It is this top layer that has a temperature that matches the power absorbed from the sun). The surface temp (in a weather-free model) just depends on the total IR optical depth--so adding Greenhouse gases increases it (c.f. Venus).
An aside on fire: if you watch a fire spread through the neighborhoods of LA, direct IR is a huge factor. When a 100ft wall of fire is a "safe" distance away with respect to convetion and conduction, you will see houses' paint bubble and smoke and then the whole thing bursts into flames. Nevertheless, I have seen houses without a line-of-sight view of flames but bathed in hot wind burst into flames too.
A: That is the greenhouse effect. The Earth as a whole is radiating as much energy as it receives from the Sun. Seen from space, Earth has a temperature of about 255 kelvin. That radiation comes from IR-active molecules in the atmosphere, mainly carbon dioxide, ozone and water.
Now, these molecules radiate both upward and downward. So the surface is heated both by direct sunlight and by IR radiation from the upper atmosphere. These two contribution are roughly equally important. 
The surface must also radiate as much as it absorbs. According the the Stephan-Boltzmann law, radiation is proportional to $T^4$. To radiate twice as much as the upper atmosphere, the surface should be warmer with a factor $\sqrt[4]{2} \approx 1.19$. This rough estimate would result in a surface temperature of about 303 K.

