Diophantine applications of Spec? Let $f(\bar x)$ be a multivariable polynomial with integer coefficients.
The zeros of that polynomial are in bijection with the homomorphisms $\mathbb Z[\bar x] \rightarrow \mathbb Z$ that factor through $\mathbb{Z}[\bar x]/(f)$.
As I understand it this viewpoint leads to the contrafunctor $\text{Spec}$ and schemes and such.
Can you show any concrete examples of Diophantine equations that we can solve using this viewpoint?
 A: As far as I know, the first Diophantine problem (over a number field) that was solved using Spec and other tools of algebraic geometry was the following result (proved by Mazur and Tate in a paper from Inventiones in the early 1970s):

If $E$ is an elliptic curve over $\mathbb Q$, then $E$ has no rational point of order 13.

The proof as it's written uses quite a bit more than you can learn just from reading Hartshorne; I don't know if there is any way to significantly simplify it.  [Added: Rereading the first page of the Mazur--Tate paper, I see that they
refer to another proof of this fact by Blass, which I've never read, but which
seems likely to be of a more classical nature.]
There is another result, which goes back to Billing and Mahler, of the same nature:

If $E$ is an elliptic curve over $\mathbb Q$, then $E$ has no rational point
of order $11$.

This was proved by elementary (if somewhat complicated) arguments.  An analogous
result with $11$ replaced by $17$ was
proved by Ogg again
using elementary arguments.
These results were all generalized by Mazur (in the mid 1970s) as follows:

If $E$ is an elliptic curve over $\mathbb Q$, then $E$ has no rational point of any order other than $2,\ldots,10$, or $12$.

Mazur's paper doing this (the famous Eisenstein ideal paper) was the one which
really established the effectiveness of Grothendieck's algebro-geometric tools for solving classical number theory problems.  For example, Wiles's work on Fermat's Last Theorem fits squarely in the tradition established by Mazur's paper.
As far as I know, no-one has found an elementary proof of Mazur's theorem; the
elementary techniques of Billing--Mahler and Ogg don't seem to be extendable to the general case.  So this is an interesting Diophantine problem which seems to require modern algebraic geometry to solve.

Often when a Diophantine problem is solved by algebro-geometric methods, it is not as simple as the way you suggest in your question.
For example, in the results described above, one does not work with one particular elliptic curve at a time.  Rather, for each $N \geq 1$, there is a Diophantine equation, whose solutions over $\mathbb Q$ correspond to elliptic
curves over $\mathbb Q$ with a rational solution of order $N$.
This is the so-called modular curve $Y_1(N)$; although it was in some sense known to Jacobi, Kronecker, and the other 19th century developers of the theory of elliptic and automorphic functions, its precise interpretation as a Diophantine equation over $\mathbb Q$ is hard to make precise without modern
techniques of algebraic geometry.  (As its name suggests, it is a certain moduli space.)
An even more important contribution of modern theory is that this Diophantine equation even has a canonical model over $\mathbb Z$, which continues to have
a moduli-space interpretation.  (Concretely, this means that one starts with
some Diophantine equation --- or better, system of Diophantine equations --- over $\mathbb Q$, and then clears the denominators in a canonical fashion,
to get a particular system of Diophantine equations with integral coefficients
whose solutions have a conceptual interpretation in terms of certain data related
to elliptic curves.)
The curve $Y_1(N)$ is affine, not projective, and it is more natural to study projective curves.  One can naturally complete it to a projective curve,
called $X_1(N)$.  It turns out that $X_1(N)$ can have rational solutions --- some of the extra points we added in going from $Y_1(N)$ to $X_1(N)$
might be rational --- and so we can rephrase Mazur's theorem as saying that
the only rational points of $X_1(N)$ (for any $N \neq 2,\ldots,10,12$) lie in
the complement of $Y_1(N)$.
In fact, there are related curves $X_0(N)$, and what he proves is that $X_0(N)$ has only finitely many rational points for each $N$.  He is then able to deduce the result about $Y_1(N)$ and $X_1(N)$ by further arguments.

The reason for giving the preceding somewhat technical details is that I want
to say something about how Mazur's proof works in the particular case $N = 11$
(recovering the theorem of Billing and Mahler).
The curve $X_0(11)$ is an elliptic curve.  One can write down its
explicit equation easily enough; it is (the projectivization of)
$$y^2 +y = x^3 - x^2 - 10 x - 20.$$
(There is one point at infinity, which serves as the origin of the group law.)
Mazur wants to show it has only finitely many solutions.   It's not clear how the explicit equation will help.  (In the sense that if you begin with this equation, it's not clear how to directly show that it has only finitely many solutions over $\mathbb Q$.)
Instead, he first notes that it has a subgroup of rational points of order $5$:
$$\{\text{ the point at infinity}, (5,5), (16,-61), (16,60), (5,-6) \}.$$
One knows from the general theory of elliptic curves that the full $5$-torsion subgroup of $X_0(11)$ is of order $25$, a product of two cyclic groups of order $5$.
We have one of them above, while the other factor is not given by
rational points.
In fact, the other $5$-torsion points have coordinates in the field $\mathbb Z[\zeta_5]$.  (I don't know their explicit coordinates, unfortunately.)
Mazur doesn't need to know their exact values; instead, what is important for
him is that he is able to show (by conceptual, not computational, arguments)
that the full $5$-torsion subgroup of $X_0(11)$, now thought of not just as a Diophantine over $\mathbb Q$ but as a scheme over Spec $\mathbb Z$,
is a product of two group schemes of order $5$: namely
$$\mathbb Z/ 5\mathbb Z \times \mu_5.$$
The first factor is the subgroup of order $5$ determined by the points with
integer coordinates; the second factor is a subgroup of order $5$ generated by
a $5$-torsion point with coefficients in Spec $\mathbb Z[\zeta_5]$.
What does it mean that this second factor is $\mu_5$?
Well, $X^5 - 1$ is a Diophantine equation, whose solutions are defined over
$\mathbb Z[\zeta_5]$, and  have a natural (multiplicative) group structure, and this is what $\mu_5$ is.
What Mazur says is that an isomorphic copy of this "Diophantine group" (more precisely, this group scheme) lives inside $X_0(11)$.
Note that the classical theory of Diophantine equations is not very well set up
to deal with concepts like "isomorphisms of Diophantine equations whose solutions admits a natural group structure".  (One already sees this if one tries to develop the theory of elliptic curves, including the group structure, in an elementary way.)   So this is already a place where scheme theory provides new and important expressive power.
In any event, once Mazur has this formula for the $5$-torsion, he can make an infinite descent to prove that there are no other rational points besides the $5$ that we already wrote down.   He doesn't phrase this infinite descent in
the naive way, with equations, as Fermat did with his descents (although it
is the same underlying idea): rather, he argues as follows:
The curve $X_0(11)$ stays non-singular modulo every prime except $11$ (as you can check directly from the above equation).  Modulo $11$ it becomes singular:
you can check directly that reduced modulo $11$, the above equation becomes
$$(y-5)^2 = (x-2)(x-5)^2,$$
which has a singular point (a node) at $(5,5)$.
Note now that all our rational solutions $(5,5), (16,-61),$ etc. (other than
the point at infinity) reduce
to the node when you reduce them modulo $11$.
Using this (plus a little more argument) what you can show is that if
$(x,y)$ is any rational point of $X_0(11)$, then after subtracting off
(in the group law) a suitable choice of one of our $5$ known points, you obtain
a point which does not reduce to the node upon reduction modulo $11$.
So what we have to show is that if $(x,y)$ is any rational solution on $X_0(11)$
which does not map to the node mod $11$, it is trivial (i.e. the point at
infinity).
Suppose it is not: then Mazur considers a point $(x',y')$ (no longer necessarily rational,
just defined over some number field) which maps to $(x,y)$ under multiplication
by $5$ (in the group law).  (This is the descent argument.)
Now this point is not uniquely determined, but it is determined up to
addition (in the group law) of a $5$-torsion point.  Because we know the precise
structure of the $5$-torsion (even over Spec $\mathbb Z$) we see that this
point would have to have coordinates in some compositum of fields of the following type: (a) an everywhere unramified cyclic degree $5$ extension of $\mathbb Q$ (this relates to the $\mathbb Z/5\mathbb Z$ factor); and (b) an everywhere
unramifed extension of $\mathbb Q$ obtained by extracting the $5$th root of
some number (this relates to the $\mu_5$ factor). Now no such extension of $\mathbb Q$ exist (e.g. because
$\mathbb Q$ admits no non-trivial everywhere unramified extension), and hence
$(x',y')$ again has to be defined over $\mathbb Q$.  Now we repeat the above
procedure ad infitum, to get a contradiction (via infinite descent).

I hope that the above sketch gives some idea of how more sophisticated methods
can help with the solution of Diophantine equations.  It is not just that one writes down Spec and magically gets new information.  Rather, the introduction of a more conceptual way of thinking gives whole new ways of transferring information around and making computations which are not accessible when working in a naive manner.
A good high-level comparison would be the theory of solutions of algebraic equations before and after Galois's contributions.
A more specific analogy would be the difference between studying surfaces in space (say) with the tools of an undergraduate multi-variable calculus class,
compared to the tools of manifold theory.  In undergraduate calculus, one has to
at all times remember the equation for the surface, work with explicit coordinates, make explicit coordinate changes to reduce computations from the curved surface to the plane, and so on.  In manifold theory, one has a conceptual apparatus which lets one speak of the surface as an object independent of the equation cutting it out; one can say "consider a chart
in the neighbourhood of the point $p$" without having to explicitly write
down the functions giving rise to the chart.  (The implicit function theorem
supplies them, and that is often enough; you don't have to concretely determine the output
of that theorem every time you want to apply it.)
So it goes with the scheme-theoretic point of view.  One can use the modular
interpretation to write down points of $X_0(11)$ without having to give their
coordinates.  In fact, one can show that it has a node when reduced modulo $11$
without ever having to write down an equation.  The determination of the $5$-torsion group is again made by conceptual arguments, without having to write down the actual solutions in coordinates.  And as the above sketch of the infinite descent (hopefully) makes clear, it is any case the abstract nature
of the $5$-torsion points (the fact that they are isomorphic to
$\mathbb Z/5\mathbb Z \times \mu_5$) which is important for the descent, not any information about their explicit coordinates.
I hope this answer, as long and technical as it is, gives some hint as to the utility of the scheme-theoretic viewpoint.

References: A nice introduction to $X_0(11)$ is given in this expository article of Tom Weston.
As for Mazur's theorem, I don't know of any expositions which are not at a
much higher level of sophistication.  (There are simpler proofs of his main technical results now, e.g. here,
but these are simpler only in a relative sense; they are still not accessible
to non-experts in this style of number theory.)
A: My very very sketchy understanding of higher algebraic geometry makes me feel like you will struggle to find easy examples of algebraic geometry being used to solve Diophantine equations. My reason for this is as follows:
Commutative algebra builds a bridge between Algebraic number theory and modern algebraic geometry. If you have a problem in algebraic number theory, it can be translated into a problem in algebraic geometry by going across this bridge. This new problem can be solved using some fancy cohomology theory, and then we can take the solution back across our bridge into algebraic number theory.
Therefore in order to find examples of algebraic geometry being used to solve number theoretic questions, you need to understand some fancy cohomology theory, which requires at least chapters 2 and 3 of hartshorne.
Of course all of this should be taken with a mountain of salt. I don't really know what I am talking about...
