An ionic bond is likely because they will want to give away two valence electrons in order to become stable.
Group 2 elements, also known as alkaline earth metals, have two valence electrons. They tend to lose these two electrons to achieve a stable electron configuration, typically resulting in the formation of cations. This behavior leads them to form ionic bonds with nonmetals, which typically gain electrons.