When writing formulas for ions and ionic compounds we often need to find the ionic charge. A trend is to find the charge by looking at the Group on the Periodic Table.
For high school chemistry just knowing the general trend may be sufficient.
A more detailed Periodic Table with ionic charges shows where the generalization doesn't hold. Also note three Transition Metals that have only one possible charge. Ag+1, Cd+2, and Zn+2. These should be memorized.