In cosmology,
recombination refers to the epoch at which charged electrons and protons first became bound to form electrically neutral hydrogen atoms.
Recombination occurred about 378,000 years after the Big Bang.
The word "recombination" is misleading,
since the big bang theory doesn't posit that protons and electrons had been combined before,
but the name exists for historical reasons since it was named before the Big Bang hypothesis became the primary theory of the creation of the universe.
Immediately after the Big Bang,
the universe was a hot,
dense plasma of photons, electrons,
and quarks: the Quark epoch.
At 10−6 seconds,
the Universe had expanded and cooled sufficiently to allow for the formation of protons: the Hadron epoch.
This plasma was effectively opaque to electromagnetic radiation due to Thomson scattering by free electrons,
as the mean free path each photon could travel before encountering an electron was very short.
This is the current state of the interior of the Sun.
As the universe expanded,
it also cooled. Eventually,
the universe cooled to the point that the formation of neutral hydrogen was energetically favored,
and the fraction of free electrons and protons as compared to neutral hydrogen decreased to a few parts in 10,000.
Recombination involves electrons binding to protons to form neutral hydrogen atoms.
Because direct recombinations to the ground state of hydrogen are very inefficient,
these hydrogen atoms generally form with the electrons in a high energy state,
and the electrons quickly transition to their low energy state by emitting photons.
Two main pathways exist: from the 2p state by emitting a Lyman-a photon - these photons will almost always be reabsorbed by another hydrogen atom in its ground state - or from the 2s state by emitting two photons,
which is very slow.
This production of photons is known as decoupling,
which leads to recombination sometimes being called photon decoupling,
but recombination and photon decoupling are distinct events.
Once photons decoupled from matter,
they traveled freely through the universe without interacting with matter and constitute what is observed today as cosmic microwave background radiation. 
