Atoms of which elements tend to gain electrons? Atoms of which elements tend to lose electrons?
Atoms of metals tend to lose electrons. Atoms of non-metals tend to gain electrons.
Whether an atom gains or loses electrons is governed by two measurable quantities - ionization energy and electron affinity.
Ionization energy (IE) is the energy required to remove the outermost electron from an atom (or ion). The lower this value, the greater the ease with which an electron can be removed. In general (although a few exceptions do exist), this energy tends to increase from left to right across any row of the periodic table, and decrease down any column.
Electron affinity (EA) is the energy involved in adding an additional electron to an atom. In most cases, this is energy released in the process (exothermic). The greater the electron affinity, the more likely the atom will gain one (or more) electrons from another atom.
Electron affinity behaves somewhat like ionization energy, in that it increases across the row and decreases down each column of the periodic table.
So, with the alkali metals, we have low IE and low EA - atoms that easily lose an electron, but do not readily gain one. With the halogens, the opposite is true - the atoms do not readily lose electrons and tend to gain one.