What is meant by the temperature of the CMB? This is what I commonly read:
The CMB came to existence when atoms where formed and photons weren't constantly absorbed anymore. In other words, the universe became "transparent". Because of the expansion of the universe that radiation experienced red-shift so that now its temperature is slightly below 3 Kelvin.
So far, so good. But what does it mean for the CMB to have a temperature? Temperature usually means the jiggling about of atoms, but the CMB is radiation. So what is meant when it is said that the temperature of the CMB is about 3 K today?
 A: Next to the very detailed and good qualified answers, here is a simplified alternative:
If you had a very dark body very far from any radiating thing, the cosmical background heated it until 2.7K.
A: The universe was a thermal plasma prior to the recombination epoch, consisting mostly of photons, protons, electrons, and alpha particles (helium-4 nuclei). There were also a small portion of deuterium, helium-3, and lithium-7 nuclei. All of this primordial stuff was in thermal equilibrium. The temperature of a gas is a result of the random velocities of particles that form the gas. In the case of the pre-big bang universe, the protons, electrons, beta particles, etc. in that soup had a "temperature" because of their random velocities.
What about photons? How can light have a "temperature" (and how can it be in thermal equilibrium)? The answer lies in thermal radiation. This radiation has a rather unique frequency signature called black body radiation. Non-thermal radiation (e.g., a laser) doesn't look anything like a black body. Whether the spectrum of some radiation signal is close to or far removed from that of an ideal black body is what distinguishes thermal radiation from non-thermal radiation. If the spectrum is close to that of an ideal black body, one can say that the radiation effectively does have a "temperature."
The light in a fully ionized thermal plasma is in thermal equilibrium with the other stuff that comprises the plasma if the spectrum of that light is close to that of an ideal black body and if that effective temperature is equal to that of the temperature of all that other stuff. Thermal equilibrium can occur in a plasma because light is constantly being scattered, absorbed, and re-emitted. This was the state of the universe prior to the recombination epoch.
Once the universe cleared, the photons previously in thermal equilibrium with the universe's ordinary primordial matter decoupled from that matter. Those photons instead were free to traverse the universe. An observer at the time of that event would have seen those first-freed photons as having a black body temperature of about 3000 K, the same temperature as that of the ordinary matter with which the photons were previously in thermal equilibrium.
Red shifted black body radiation retains the key characteristic of black body radiation, which is a spectrum that follows that of an ideal black body. However, the effective temperature of that red shifted spectrum is lower than the effective temperature prior to the red shifting. Thirteen-plus billion years after that recombination event, we see a red shifted background radiation that still looks very much like that of a black body, but with an effective temperature of only 2.726 K instead of 3000 K. 
A: CMB spectrum has near-perfect black-body Planck spectra. Planck distribution has temperature as a parameter. By fitting observed spectrum by Planck function, we can "measure" temperature of CMB. This way we observe 2.7 K temperature today.
In the context of photons temperature describes degree of disorder of photons of radiation in thermal equilibrium (that's the reason why temperature is the only parameter). But it is the same notion of temperature that applied universally in physics. Temperature of the air, of rigid bodies etc. are just particular examples of bodies with disorder, nonzero entropy and temperature. But it is essentially the same quantity: for example, if CMB radiation would significantly interact with matter (as it was before recombination), by laws of thermodynamics it will sustain the same temperature with the matter.
