It is theorized that till about 380,000 years after the Big Bang, the universe was opaque. Why did the particles present before the formation of atoms make the universe opaque? Why did the universe suddenly became transparent once the atoms started forming? And how do we know that it was opaque since the stars hadn't started forming yet ?
Before the electrons and protons merged together to form atoms of hydrogen (below a certain temperature, about 400 000 years after the Big Bang), the electrons and protons were moving like in a plasma. The photons present were scattered all the time, which made the Universe opaque.
After the recombination of the two particles, the photons could move freely, later to become the CMBR.
We can read here:
The Universe became transparent to the light leftover from the Big Bang when it was roughly 380,000 years old, and remained transparent to long-wavelength light thereafter. But it was only when the Universe reached about half a billion years of age that it became fully transparent to starlight, with some locations experiencing transparency earlier and others experiencing it later.
The cosmic microwave background (CMB) is thought to be leftover radiation from the Big Bang or the time when the universe began. As the theory goes, when the universe was born it underwent rapid inflation and expansion. (The universe is still expanding today, and the expansion rate appears different depending on where you look). The CMB represents the heat leftover from the Big Bang.