How do cosmic background rays help determine the age the universe was formed?
I’ll keep this as simple as possible ... and close with a pretty good reference for further study.
The universe formed in a “hot, dense state” (admirable understatement if ever there was one) but as time passed it cooled down. Initially it was too hot (the particles had too much kinetic energy on average) to allow electrons to settle into stable positions in atoms.
As a result of all the free charged particles pinging about, the universe was opaque to light (actually the whole e-m spectrum, but “light” will do.) This is because charged particles are extremely likely to absorb and re-emit photons, meaning the photons could not travel very far without their being given a random direction as a result of the collision. Thus in simple terms, light could not be transmitted across the universe, hence the term ‘opaque’.
When the universe was at about 3000K, it became possible for nuclei to ‘hold on to’ electrons (in energy terms the kinetic energy of the particles fell below the electrical potential energy required to stabilise them) and this is understood to have happened about 370 to 380 000 years after the Big Bang.
At this point e-m radiation could travel across the universe and excess energy was released as a burst of x-rays. Over time the universe’s expansion has stretched the space through which these waves travel, meaning their wavelength has increased to the point where we now observe them in the microwave region.
This allows for a determination of the age of the universe, provided we can accurately measure the time that has elapsed between this ‘recombination era’ (silly name, but ...) and now. This is subject to debate, but at least gives excellent evidence for a Big Bang having existed.
A (much) greater level of detail is provided here in the Wikipedia article.