The first thing to calculate is the temperature at which hydrogen atoms formed. For a first approximation, you can use the Saha ionization equation for the density of atoms in the $i$th state of ionization when they are in thermal equilibrium, and approximate hydrogen as having only the $n=1$ state at -13.6 eV. As explained here, this gives
$$\frac{x_e^2}{1-x_e} = \frac{1}{n}\left(\frac{m_ek_BT}{2\pi\hbar^2}\right)^{3/2}e^{-E_1/k_BT}$$
where $x_e$ is the fraction of hydrogen that is ionized, $n$ is the number density of hydrogen (both ionized and un-ionized), $m_e$ is the mass of an electron, $k_B$ is the Boltzmann constant, $T$ is the temperature, $\hbar$ is the reduced Planck constant, and $E_1=13.6$ eV is the ionization energy of the $n=1$ state.
On the right-hand-side, the two quantities that vary with the evolution of the universe are $n$ and $T$. To find the temperature when the ionization fraction is 50% (so that the left-hand-side is 0.5), we need to know $n$ in terms of $T$.
According to modern cosmological theories, the number density is believed to vary as the inverse cube of the Friedmann scale factor, $n \propto a^{-3}$. The temperature is believed to vary as the inverse of the scale factor, $T \propto a^{-1}$. Thus the number density varies as the cube of the temperature, $n \propto T^3$. So we can write
$$n=n_1\left(\frac{T}{T_1}\right)^3$$
The current number density of hydrogen $n_1$ is measured as $1.6$ per cubic meter, and the current temperature $T_1$ of the universe is measured as $2.7$ K, so the ionization fraction was 50% when $T$ satisifies
$$\frac{1}{2}=\frac{1}{n_1}\left(\frac{T_1}{T}\right)^3\left(\frac{m_ek_BT}{2\pi\hbar^2}\right)^{3/2}e^{-E_1/k_BT}$$
If you put in the various values, you find that the solution is $T=3944$ K.
Here is a plot showing how, in this model, the hydrogen ionization fraction $x_e$ falls from nearly 1 to nearly 0 as the temperature drops from $5000$ K to $3000$ K in the expanding universe:

The second thing to calculate is when was the temperature of the universe $3944$ K. This temperature is $1460$ times greater than the current temperature of $2.7$ K. Since the Friedmann scale factor $a(t)$ varies inversely with the temperature, hydrogen formed when the scale factor was $1460$ times smaller than it is today.
So, when was the universe $1460$ times smaller than it is today? A decent approximation is that, since the time hydrogen formed, the universe has been matter-dominated. The Friedmann equations tell us that $a\propto t^{2/3}$ for a matter-dominated universe. This means that the time $t$ when the universe was $1460$ times smaller was when the time was a fraction $1/1460^{3/2}=1/55,800$ of what it is now.
Since the current age of the universe is $13.8$ billion years, this means that hydrogen formed around $247,000$ years after the Big Bang.
Better estimates yielding $379,000$ years take into account other ionization states of hydrogen, other elements, the fact that universe was not completely matter-dominated after recombination, and probably other details.