More active elements (including metals) have either a nearly empty or nearly full electron shell in the atom. For example, Sodium has one electron in its outer shell, and to become more stable, like Neon or any other noble gas, it tries to lose an electron.
A similar case occurs with chlorine...