* Electron Configuration: Halogens have seven valence electrons (electrons in their outermost shell). They are only one electron away from achieving a stable, full octet, which is the ideal configuration for most atoms.
* Electrostatic Attraction: The nucleus of a halogen atom has a strong attraction for electrons due to its positive charge. This attraction is further enhanced by the fact that the valence electrons in halogens are relatively close to the nucleus.
* Energy Release: When a halogen atom gains an electron, it releases energy, making the process energetically favorable. This is because the added electron fills the outermost shell, creating a more stable configuration.
In summary: Halogens gain electrons to achieve a stable electron configuration (a full octet) and because the process is energetically favorable. This tendency to gain electrons is what makes them highly reactive nonmetals.