How is CMB related to the temperature of the universe As I understand it, CMB (cosmic microwave background) is the radiation emitted when matter decoupled at the early stages of the big bang. The thing I don't understand is do all stars emit this kind of radiation or just the ones formed at the early stages of the big bang and are those stars travelling at the speed of light away from us also how is the fact that light is redshift related to the temperature of empty space. 
 A: Today, stars don't emit the CMB – they emit much more energetic (hotter, higher-frequency, shorter-wavelength) radiation in general. CMB was emitted by "everything" that could emit radiation at the relevant time, around 400,000 years after the Big Bang. At that time, the radiation was in thermal equilibrium with everything else, so its distribution to frequencies was fully described by the Planck black body curve.
The universe was expanding and the wavelengths were just being expanded linearly with the size of the universe. The temperature was dropping inversely proportionally to the size of the Universe. At some moment, the radiation got decoupled so it started to live its own life, with the temperature no longer linked to the temperature of the matter around. The temperature continued to drop inversely proportionally to the size of the universe while the temperature of the stars etc. stayed higher and independent because the two subsystems no longer interacted.
None of these things has anything to do with the speed of divergence of mutually distant galaxies. The temperature is a local quantity and it's determined by the local physics while the mutual speed of distant galaxies is not a local effect. It is a global effect and an illusion of a sort, too. The increasing distance between the galaxies is due to the expansion of the space in between them. However, all the calculations of the temperature and its evolution may be applied locally at each place of the universe, independently of distant places of the universe, and this calculation of the temperature and its evolution is moreover the same at every place because the universe is uniform at cosmological scales.
