How far back in time can we say $\rho_{\gamma}(t) = \rho_{\gamma, 0}a(t)^{-4}$? The equation for the density of light in the universe is
$$ \rho_{\gamma}(a) = \rho_{\gamma, 0}a^{-4} $$
where $\rho_{\gamma, 0}$ is the density of the CMB today.
I understand why this scaling relation holds.
I am wondering what is the domain of validity of the exact same equation
$$ \rho_{\gamma}(t) = \rho_{\gamma, 0}a(t)^{-4} $$
but now with everything as a function of time. It seems the same, but now I have the actual history of the universe in mind.
How far back in time can we extrapolate this relation? My worry is that when we go back in time in the universe, there could be interactions that affect the density of photons. To give an extreme case, I think this fails for the inflation era (in the inflation model), because photons haven't even been produced by the inflaton field, so presumably $\rho_{\gamma}(t) = 0$ at that time.
So how far back does this hold? Back to recombination? To big bang nucleosynthesis? To baryogenesis?
 A: Observationally, we understand the expansion rate of the Universe as far back as Big Bang Nucleosynthesis (BBN). Constraints on extra relativistic degrees of freedom during BBN limit how much the expansion history can differ from $a(t)$ calculated in $\Lambda{\rm CDM}$. We don't have concrete observational information about the expansion rate before this time.
Theoretically, the key is to look at the rate of reactions that can create or destroy photons, compared to the Hubble rate. If there is an unbalanced reaction that creates a significant number of photons in a time shorter than the Hubble time, then that would cause the energy density to increase. Reheating or preheating (the proposed processes by which the inflaton field would generate matter at the end of inflation) would be a natural candidate for "photon-genesis" to occur (note: I have never seen the term "photon-genesis" before and as far as I know it is not used to describe a specific process, I am using it here just to convey the idea). It's also possible many photons were generated in electron-positron annihilations after leptogenesis, or similar kinds of annihilation processes.
