Full Idea
The modern notion is that atoms fall into the same group of the periodic table if they possess the same numbers of outer-shell electrons.
Gist of Idea
Elements in the table are grouped by having the same number of outer-shell electrons
Source
Eric R. Scerri (The Periodic Table [2007], 07 'Quantum')
Book Reference
Scerri,Eric R.: 'The Periodic Table' [OUP 2007], p.192
A Reaction
Scerri goes on to raise questions about this, on p.242. By this principle helium should be an alkaline earth element, but it isn't.