We study the ground state magnetic properties of ferromagnetic spinor
Bose-Einstein condensates confined in a deep optical lattices. In the Mott
insulator regime, the ``mini-condensates'' at each lattice site behave as
mesoscopic spin magnets that can interact with neighboring sites through both
the static magnetic dipolar interaction and the light-induced dipolar
interaction. We show that such an array of spin magnets can undergo a
ferromagnetic or anti-ferromagnetic phase transition under the magnetic dipolar
interaction depending on the dimension of the confining optical lattice. The
ground-state spin configurations and related magnetic properties are
investigated in detail