"Usual" quantum field theory calculations are all done with respect to the ground state of the system; correlation functions are all taken with respect to the ground state. In other words, they are done at zero temperature, which is a perfectly valid approximation for many applications.
However, in some applications you are working at finite temperature, or maybe you explicitly want temperature-dependent observables like the specific heat. For example, if your system is in equilibrium with some temperature T, you need to sum over all excited states with each state weighted by a Boltzmann factor:
[tex]
\langle A \rangle = \frac{1}{Z}\sum_n \langle n | A | n \rangle e^{-\beta E_n} = \frac{\mathrm{Tr}\left( A e^{- \beta H} \right)}{\mathrm{Tr}\left( e^{- \beta H} \right)}[/tex]
Computing these expectation values using perturbation theory/diagrams is done using the Matsubara formalism, which you can find in many textbooks.
I'm not familiar enough with cosmology to know the specific application to the CMB which you mentioned.