This question already has an answer here:

If light was released ~.38MY after the big bang and the expansion of the universe has caused it to shift into the microwave region why is it referred to as being 2.7K? Temperature is the movement of excited molecules in a medium whereas radiation only has frequency and intensity. What does the "temperature" mean?


marked as duplicate by John Rennie thermodynamics Apr 27 '18 at 6:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.