Quantum mechanics determines the possible states of electrons in an atom. Whereas a planet could theoretically orbit a star at any distance, electrons have discrete properties described by a few numbers. These states can be ordered by energy and other factors that determine which states the electrons occupy. But perhaps the most important rule, the exclusion principle, prevents any two electrons from having the same state. So instead of all adopting the "ground" state, they spread out in a pattern called an electronic configuration. Each element has one more electron than the last, resulting in an update in the configuration; and the "outermost" (top-state) electrons are those most readily available to chemical reactions.
If you want to learn more about the specifics, read about periodic law. Consequences include patterns in the sizes of atoms, how the atoms interact with light (by changing an electron's energy by the amount of energy in one photon of light), and how readily they gain or lose electrons in the manners required for engagement in specific chemical reactions.
The exclusion principle also affects how the protons and neutrons in a nucleus are arranged, which has some implications for nuclear physics. But a proton is different from a neutron and can access the same state as a neutron does. There are a few other complications unique to nuclear physics too, which you can learn about by researching the semi-empirical mass formula.