An atom is stable because of a balanced nucleus that does not contain excess energy. If the forces between the protons and the neutrons in the nucleus are unbalanced, then the atom is unstable. Stable atoms retain their form indefinitely, while unstable atoms undergo radioactive decay.
The proton mass depends on another knob that has a very wide range of variation and needs to be fine-tuned to one in 10^33 to get any stable atoms other than hydrogen.
It is one of the laws of nature that nature prefers every system to be in the most stable state possible, which is the lowest energy state, such as the ground state, in going towards equilibrium, because of the nature’s requirement for favoring a least entropy state, ie having least disorder or chaos. Thus you would see smallest particles from atoms and its constituents to the large-scale structures like galaxies and constellations, everything is tending to an equilibrium, trying to shed its energy and reach stability.
Thus, whenever any system such as an electron or an atom reaches an excited state, it attempts to fall back to the ground state, either directly or through intermediate energy states.
Bohr's starting point was to realize that classical mechanics by itself could never explain the atom's stability. A stable atom has a certain size so that any equation describing it must contain some fundamental constant or combination of constants with a dimension of length. The classical fundamental constants--namely, the charges and the masses of the electron and the nucleus--can not be combined to make a length. Bohr noticed, however, that the quantum constant formulated by the German physicist Max Planck has dimensions which, when combined with the mass and charge of the electron, produce a measure of length. Numerically, the measure is close to the known size of atoms. This encouraged Bohr to use Planck's constant in searching for a theory of the atom.
Electrons and all the nucleotides play a significant role in the stability of the atom. But the most basic stability is explained by neutrons and protons in the nucleus, the nucleus is a compact mass due to the close packing of protons they experience strong repulsion forces. These forces are compensated by attraction forces between the nucleotides, this force is called nuclear force. So this nuclear force makes an atom stable, as the mass number increases repulsion forces between the protons starts dominating the nuclear force, this causes the phenomenon called radioactivity which makes an atom unstable.
Protons have a mass of 938.27 MeV. Neutrons have a mass of 939.56 MeV. So the difference between them is small: a neutron is about 1.29 MeV heavier than a proton. There is no obvious reason why protons and neutrons should have just these masses, but if they were even slightly different, we wouldn’t be here. 1
There are relatively tight constraints on about 5 combinations of parameters and small changes in these combinations lead to major changes in the structure of the world. Briefly stated, it is that the weak interactions must overlap with the strong interactions. The allowed parameter space seems to very small and the world as we know it seems highly fine-tuned for the existence of atoms and nuclei. One has to see the many constraints in order appreciate just how very small a portion of parameter space is available which leads to atomic structure. 2