Free neutrons (outside the nucleus) are known to be highly unstable with a mean lifetime of around 14 minutes and 40 seconds. Inside the neutron, which is composed of 1 up quark and 2 down quarks, a down quark changes to an up quark by releasing a $W^-$ boson, and thus creating a proton.
$$d\rightarrow u+W^-$$
$$udd\rightarrow uud+W^-$$
$$n^0\rightarrow p^++W^-$$
The neutron has a decay energy of 0.782343 MeV. The energy differential is sufficient to create an electron (which just needs 0.511 MeV), an anti-neutrino and 0.269 MeV of energy.
Thus:
$$n^0\rightarrow p^++e^-+\bar{\nu}_{e}+0.269 MeV$$
The remaining energy can be used as Kinetic Energy for expelling the electron. Or a gamma ray photon is produced which carries away the extra energy.
$$n^0\rightarrow p^++e^-+\bar{\nu}_{e}+{\gamma}$$
The electron require 13.6 eV to break free of the proton. In some cases the proton interacts with the electron, which is unable to achieve the 13.6 eV required, and as a result remain bound to the proton, forming a neutral hydrogen atom, with all the neutron decay energy being carried off by the neutrino. What determines whether the neutron decay results in production of a hydrogen atom? How can we ascertain whether the extra energy is carried away by the gamma ray photon, or by the neutrino or indeed used for the expulsion of the electron?