In the simple yet remarkably accurate liquid drop model of the nucleus, there are five contributions to the nuclear binding energy. As a function of the mass number $A$ and the atomic number $Z$, the semi-empirical formula for the binding energy is
$$E_B = a_V A - a_S A^{\frac{2}{3}} - a_C \frac{Z(Z-1)}{A^{\frac{1}{3}}} - a_A \frac{(A-2Z)^2}{A} + \delta(A,Z)$$
- The first term is the volume term, which accounts for the pairwise nucleon-nucleon binding energy provided by the residual strong force
- The second is the surface term, which corrects the prior estimate because the nuclei near the "surface" of the nucleus are subject to smaller binding energies than those in the center
- The third is the Coulomb term, which accounts for the mutual electrostatic repulsion of the protons embedded in the nucleus
- The fourth is the asymmetry term, which is minimized when the number of protons and neutrons is equal. The theoretical motivation for this term is the Pauli exclusion principle - because no two protons (resp. neutrons) can occupy the same state, adding additional protons (resp. neutrons) to a nucleus necessarily means that the latter will exist in significantly higher energy states.
- The final term is the pairing term, which accounts for the pairwise interaction between nucleon spins. This function takes the form
$$\delta(A,Z) = \cases{\delta_0 & if N and Z are even \\ -\delta_0 & if N and Z are odd \\ 0 & otherwise}$$
The parameters $a_V,a_S,a_C,a_A,$ and $\delta_0$ can be experimentally measured. The resulting prediction for binding energy is remarkably good, especially considering the simplicity of the model. More sophisticated models take into account things like the nuclear shell structure, which provides extra stability for the "magic numbers."
In the context of this model, your question is answered by the asymmetry term. An excess of neutrons causes the neutron Fermi level to be too high - the nucleus would be more stable if some of extra neutrons underwent beta decay and became protons, so generically this is what happens.