How does one measure temperature? That is done by looking at the kinetic energy of things at a very small scale. Hot particles move faster than cold particles. In a vacuum there are very few things to measure the kinetic energy of, and likewise very few things to conduct (move) heat from one thing to another. This is why the vacuum does have a very nice property as an insulator. It is used in vacuum dewars in chemistry for putting liquid nitrogen in something that you can carry around. However, you can radiate heat away from a body. This is why the space shuttle flys with its doors open - to help radiate all of the heat that it can away.

However, it is also possible to look at radiation (photons) to detect the temperature of something. The Cosmic Background Explorer (COBE) measured the fluctuations of the background microwave radiation. It measured the temperature of space to be 2.7280 - 2.7281 Kelvin.

That is very cold.

This comes from the background that at one time, space was very hot. Within the universe, there is no way for energy to get out of the universe. This extreme heat over the billions of years has diffused out into lower and lower (and continues to drop) temperatures. The photons that existed then continue to exist but have much more space to transfer energy between. As the average density of the universe goes down (because it expands), the average temperature also goes down. Yes, there are hot spots known as stars relatively warm spots known as planets. Most of the universe is still very cold.