It can be shown that the set of natural numbers less than n that are relatively prime to n form a group under multiplication mod n. Therefore, the set {1,3,5,7} forms a group under multiplication mod 8. There are 4 members in this group, and it can also be shown that any 4-member group is isomorphic to either ##C_4##, the cyclic 4-member group (with a single generator for all elements in the group) or the Klein group (isomorphic to ##C_2\times C_2## or ##D_2##). The set {1,3,5,7} under multiplication mod 8 can't be isomorphic to the cyclic 4-group because ##1^2 \equiv 3^2 \equiv 5^2 \equiv 7^2 \equiv 1 \mod 8##, so no single element generates the rest of the elements in the group. Therefore, it has to be isomorphic to the Klein group (the ##D_2## dihedral group, or if you like, the symmetry group of a non-square rectangle). (You could also just compare the multiplication tables of the two groups directly).
Geometrically, we can see the relationship between the group above and the symmetry of a (non-square) rectangle in 2 dimensions. The 4 elements of the symmetry group for the rectangle are 1) the identity, 2) 180 degree rotation about the symmetry axis, 3 and 4) the two reflections perpendicular to the plane of the rectangle. The congruence ##1^2 \equiv 3^2 \equiv 5^2 \equiv 7^2 \equiv 1 \mod 8## corresponds to the fact that 1) if you apply the identity twice, you get the identity, 2) if you rotate by 180 degrees twice, you get the identity, 3 and 4) if you reflect along the same mirror plane twice, you get the identity.