Why did our universe become transparent to light approx. 300,000 years after the Big Bang started?

The answer is the same reason why a glass of water left out at room temperature will evaporate. Even though most of the particles will be below the boiling point, the equilibrium one expects is not entirely in the liquid phase. The occasional particularly energetic water molecule will vaporize, just as the occasional neutral hydrogen atom will be struck by a particularly energetic photon and ionize.

Rather than a sharp transition occurring where the temperature equals the ionization potential, a far better approximation is attained with the Saha equation, which accounts for the fact that thermal distributions of particles have a range of energies.

Accounting for the spin degeneracies properly (bound hydrogen has a factor of $2$ more available states than isolated protons), the Saha equation becomes $$ \frac{n_\mathrm{e}n_\mathrm{p}}{n_\mathrm{H}} = \frac{(2\pi m_\mathrm{e}kT)^{3/2}}{h^3} \mathrm{e}^{-E_\mathrm{bind}/kT}. $$ Here $\mathrm{e}$, $\mathrm{p}$, and $\mathrm{H}$ stand for free electrons, free protons, and neutral hydrogen.

Because the universe is neutral, $n_\mathrm{e} = n_\mathrm{p}$. Suppose we want a fraction $f$ of ionization: $n_\mathrm{p}/n_\mathrm{H} = f$. If the universe has a density $\rho$, then $n_\mathrm{p} + n_\mathrm{H} = \rho/m_\mathrm{p}$. Combining all this, the left-hand side can be written $$ \frac{n_\mathrm{e}n_\mathrm{p}}{n_\mathrm{H}} = \frac{f^2}{f+1} \cdot \frac{\rho}{m_\mathrm{p}}. $$

We now have just two unknowns in our equation, $T$ and $\rho$. However, the predictable expansion of the universe tells us $$ T = T_0 (1+z) $$ for $T_0 = 2.725\ \mathrm{K}$, and that $$ \rho = \Omega_{\mathrm{b},0} \rho_\mathrm{crit} (1+z)^3 $$ for $\Omega_{\mathrm{b},0} = 0.04628$. Here the critical density is $$ \rho_\mathrm{crit} = \frac{3H_0^2}{8\pi G} $$ for $H_0 = 69.32\ \mathrm{km/s/Mpc}$.

Putting everything together, we can rewrite the Saha equation as $$ \frac{f^2}{f+1} \cdot \frac{\Omega_{\mathrm{b},0}\rho_\mathrm{crit}}{m_\mathrm{p}} \left(\frac{T}{T_0}\right)^3 = \frac{(2\pi m_\mathrm{e}kT)^{3/2}}{h^3} \mathrm{e}^{-E_\mathrm{bind}/kT}. $$ Solving yields $T = 3660\ \mathrm{K}$.

Note this analysis itself makes some approximations, such as neglecting helium.


You are right that the universe formed atoms much earlier (at the temperature when photons can no longer ionize the atoms, i.e. at around $T = 150,000 K$ as you point out with your order of magnitude calculation). However, photons could still scatter off these atoms. Indeed this was quite likely considering the high density of matter in the universe. The universe could only become visible one the average mean free path of a photon became comparable to the size of the observable universe (this is characterized by the Hubble radius, which is the distance an object has to be sitting from you such that it effectively recedes away from you at the speed of light). As is shown on page 9 of this article, this then in fact corresponds to a temperature of $3000K$.