Let $f:X\to Y$ be a semistable family of complex abelian varieties over a
curve $Y$ of
genus $g(Y)$, and smooth over the complement of $s$ points. If $\ell$ denotes
the rank of
the nonflat $(1,0)$ part $F^{1,0}$ of the corresponding variation of Hodge
structures,
the Arakelov inequality says that
$$2\cdot \deg(F^{1,0})\leq \ell\cdot (2g(Y)-2+s).$$
The family reaches this bound if and only if the Higgs field
of the variation of Hodge structures is an isomorphism.
The latter is reflected in the existence of special Hodge cycles in the
general
fibre, and the base of such a family is a Shimura curve.
In particular, for $s\neq 0$, such a family must be isogenous to the
$\ell$-fold product of a modular family of elliptic curves, and a constant
abelian variety.
For $s=0$, if the flat part of the variation of Hodge structures is defined
over the
rational numbers, one finds the family to be isogenous to the product of
several
copies of a family $h:Z\to Y$, and a constant abelian variety.
In this case, $h:Z\to Y$ is obtained from the corestriction of a
quaternion algebra $A$, defined over a totally real numberfield $F$, and
ramified over all
infinite places but one.
In case the flat part is not defined over the rational numbers, one still can
classify
the corresponding variations of Hodge structures.