The primary function of EF hand motifs is to bind calcium ions, which induces a conformational change in the protein. This change can activate or inhibit the protein's function, thus playing a pivotal role in regulating cellular activities like muscle contraction, neurotransmitter release, and cell motility.