Valence electrons and ionic charge

An element's valence electrons, read from its column, decide the charge of its usual ion and the formulas of its compounds, so elements in the same group form analogous compounds.

From AP Chemistry.