The unifying factor that explains the periodic trends you've listed is the stability of a full outer level of electrons. Atoms gain, lose or share the number of electrons that result in the stable electron configuration of a noble gas. The noble gases all have full valence (outer) levels of electrons. This is called the Octet Rule because all but the smallest atoms have a full outer level when they have 8 valence electrons.
Chemical properties and periodic trends can be explained in terms of valence electrons. Elements in the same group have the same number of valence electrons, so they gain or lose the same number of electrons as other elements in their family.
Metals react with non-metals because metals achieve a stable octet by losing electrons and non-metals achieve a stable octet by gaining electrons. When electrons are transferred from a metal to a nonmetal the resulting oppositely charged ions are attracted to each other, thus the ionic bond.
The general pattern in the main group (groups 1, 2 and 13-18) is:
Elements in group 1 have one valence electron. They lose this electron and form +1 ions.
Elements in group 2 have two valance electrons, and they lose both valence electrons to form +2 ions.
Boron and aluminum in group 13 lose their 3 valence electrons to form +3 ions.
Elements in group 4, with 4 valence electrons, are more likely to share electrons in covalent bonds to achieve full octets.
Elements in groups 15, 16 and 17 gain 3, 2 and 1 electrons respectively, forming -3, -2 and -1 ions. The noble gases in group 18 already have a full octet and don't gain or lose electrons, making them unreactive.