|MadSci Network: Physics|
A temperature is a macro property of matter. A photon is a single energy quantum, an electromagnetic wave, thus a disturbance in the geometric properties of space, which gives it a mass. Modern physics is too much tied up in mind models centered around the "particle" extreme, which causes thoughts like yours. No, photons are not dancing particles in almost empty space with a speed distribution of gas particles at 5K they all move nicely at exactly "c" speed. It is the other way around: from looking at the electromagnetic spectrum of all areas of the Universe, which are almost "dark" and fitting Plank's distribution into it, we conclude that the radiation of the dark space of our Universe matches the one from a piece of matter at a few Kelvin. You could abuse the Boltzmann constant, which couples energy and temperature (E=kT) to assign a "temperature" to a photon as T= hf/k. Some times we rape words and concepts in physics, it would be better to simply say: the concept of "temperature" does not apply to a single energy quantum.
Try the links in the MadSci Library for more information on Physics.