We feel cold and heat here on earth through the air that may or may not have been warmed up. In the summer the sun warms the air, in the winter the air is heated much less as we are more turned away from the sun. But if there is no air, as in space, how can you speak of cold or warm?
Answer
Deep in the Earth there is no air either, but it is warm!
Heat is kinetic energy: in a hot medium the particles (atoms or molecules) move faster on average than in a cool medium. The medium in which we live is the air; the radiation of the sun falls on the earth, gives off its energy to the earth, and thus heats it up; the infrared radiation emitted by the earth then heats up the air. If a body or a gas in space can also absorb the energy of the sun, it will also be heated, like the air with us.
Answered by
prof. Christopher Waelkens
Astronomy
Old Market 13 3000 Leuven
https://www.kuleuven.be/
.