Even if there were no atoms, you must consider the electromagnetic field (or photons if you want to think that you have particles).
If you have a perfectly empty box (with total vacuum inside) and the walls have some temperature (for example 2.7K) then, after a while, inside the box will appear the electromagnetic field with the blackbody radiation of the walls temperature.
It's convenient to assign properties to the electromagnetic field, in this case the temperature. And the correct temperature of the electromagnetic field inside the box is the same as the temperature of the walls.
And the best thing is that the walls are not necessary! You can assign a temperature to the universe background radiation. If the distribution of frequencies of the electromagnetic field is equal to the blackbody radiation of a 2.7K blackbody, then you can think that the temperature of the electromagnetic field is also 2.7K.
If you have a perfectly empty box (with total vacuum inside) and the walls have some temperature (for example 2.7K) then, after a while, inside the box will appear the electromagnetic field with the blackbody radiation of the walls temperature.
It's convenient to assign properties to the electromagnetic field, in this case the temperature. And the correct temperature of the electromagnetic field inside the box is the same as the temperature of the walls.
And the best thing is that the walls are not necessary! You can assign a temperature to the universe background radiation. If the distribution of frequencies of the electromagnetic field is equal to the blackbody radiation of a 2.7K blackbody, then you can think that the temperature of the electromagnetic field is also 2.7K.
More details: http://en.wikipedia.org/wiki/Photon_gas