You refer to the electron negativity of the elements
(taken from Wikipedia).
- Studying the first column of the periodic table (alkali atoms) we find, that they possess a "small" electron negativity compared to the other elements. This tells us, that these elements have only a "weakly" bounded valence electron. Nevertheless, all alkali atoms possess a positive electron negativity -- due to the fact that the nucleus is positively charged an electrons are negatively charges, it is energetically favourable to form an atom in contrast to an "electron-ion" pair.
- In contrast, the electron negativity of F (Fluorine) is the larges among all elements. All elements in its column share a "large" electron negativity. Hence, they have the tendency to "capture/share" an additional electron.
Having said this, I feel the need to point out, that the two mentioned electron configuration
- $1s^22s^22p^5$, which belongs to the element F, and
- $1s^22s^22p^6$, which belongs to Ne,
possess different number of electrons. Hence, we can not generalise and say the the first configuration has a higher energy than the second, because they differ by an additional electron. Thus, although it is true that F will almost always "capture/share" an electron if it is in contact with an other element, it is not true for all elements. E.g. He, is a nobel gas, which is not reacting with F. Hence, in order to understand which configuration possesses the lowest energy, we have to consider the complete system.