There are two kinds of "heat": 1) That caused by the motion and consequent collision of particles in a fluid medium, and 2) Infra-red radiation, which is photonic energy that can travel through a vacuum.
Infra-red is not, in itself, heat. It is transformed into heat energy when it strikes particles in a fluid medium; that is, an infra-red photon gives up its energy as kinetic energy imparted to a particle. The resulting acceleration of the particles is read by our senses as an increase in temperature.
Fluid media "conduct" heat by entropy; that is, a fast-moving particle strikes another, losing some of its own energy while the new particle gains what was lost, like a cueball striking another ball in snooker. The cueball slows down, but the coloured ball speeds up. If we had a frictionless snooker table, the balls would continue moving and bouncing until all of them had struck each each other multiple times, so that they were all eventually moving at about the same speed. Physicists call this condition "the state of maximum entropy".
Even in space, there are particles, but these are too far apart and only rarely collide to conduct heat. This is why heat, in the form of kinetic energy, cannot effectively propagate through a vacuum.
The sun heats the Earth by emitting infra-red radiation, which strikes the particles in our atmosphere after crossing the vacuum. This radiation gives up its energy as kinetic energy in the atmospheric particles, which accelerate and heat up as a result.
The opposite of this process occurs when a particle loses kinetic energy to emit a photon of infra-red radiation. Every object does this, because the second law of thermodynamics dictates that entropy always increases over time in a closed system (i.e. the Universe). However, the rate at which energy is radiated by photon emission is far lower than the rate at which it is transmitted by the kinetic interaction of particles. This is the cooling problem that confronts astronauts in space. Hot objects in space DO cool by infra-red emission, but much more slowly than, say, a hot copper plate in a bath of water.
So the solution, for astronauts, is to find ways of increasing the rate of infra-red emission rather than relying on contact with a fluid medium. Dark objects radiate more efficiently than light objects (which is why a black car on a hot day is hotter than a white car), so a good vacuum-cooling solution here would be to coat an object with photosensitive paint that turns white in the presence of light, but becomes black in darkness. I personally have not heard of such a product, but that doesn't mean it hasn't been or can't be made.