As damiano makes implicit in his answer, a curve of genus two admits a map of degree N to an elliptic curve if and only if there is an isogeny of degree *N^2* of its Jacobian and a product of two elliptic curves. The case *N=2* also admits the following simple description: a genus two curve (over an alg. closed field) is a double cover of an elliptic iff it can be written as $y^2 = f(x^2)$, where $f$ is a squarefree cubic with $f(0) \neq 0$.

One can say slightly more. Given a map $f : C \to E_1$ of degree *N*, we get also a map $f_\ast : \mathrm{Jac} \; C \to E_1^\vee$. If we assume that *f* does not factor through an isogeny then the kernel is connected so we get a second elliptic curve *E*_{2} lying as a subgroup on the Jacobian. So the Jacobian has two elliptic subgroups and it turns out that they intersect exactly in their *N*-torsion points. We get an induced isomorphism between the *N*-torsion subgroups which turns out to invert the Weil pairing, and this is the data needed to reconstruct *C*. Namely, given two elliptic curves and an isomorphism of their *N*-torsion subgroups inverting the Weil pairing, one may consider the graph of this isomorphism in the product of the elliptic curves. The condition on the Weil pairing ensures that the graph is a maximally isotropic subgroup, so the quotient will have a principal polarization, and (when the quotient is not again a product of two elliptic curves) this is exactly the Jacobian of *C* with its principal polarization.

This is pretty classical stuff which is well explained in several articles by Ernst Kani and Gerhard Frey. Start with "Curves of genus 2 covering elliptic curves and an arithmetical application." It can also be fruitful to think about this in a general context of Prym varieties -- when we have a degree *N* map from a genus two curve to an elliptic curve, the second elliptic curve which appears is of course exactly the Prym variety, which in this case is principally polarized.

I know in particular that Frey and Kani worked out some rather precise conditions on when a principally polarized abelian surface arising as a quotient of a product of two elliptic curves as above actually is the Jacobian of a curve. I am not really sure in what article it can be found though. It was something like: pairs of elliptic curves with an isomorphism of their *N*-torsion are parametrised by $Y(N) \times Y(N) / SL(2,{\mathbb Z}/N)$, and the locus of such pairs which do not give rise to the Jacobian of a curve is the union of certain Hecke correspondences on *Y(N)*. The description of exactly which Hecke correspondences was pretty complicated but when *N* is prime it was at least workable. The case of *N=2* is easy though: then the "bad" locus is just the image of the diagonal in $Y(2) \times Y(2)$.