Why does representing functors help solving Diophantine equations? Here I read:

Another insight of Grothendieck and his school was, how important it is to represent functors in algebraic geometry - regardless of what you want at the end. [as Mazur reports, Hendrik Lenstra was once sure that he did want to solve Diophantine equations and did not want to represent functors - and later he was amused that he represented functors to solve Diophantine equations.]

My question is already in the title: Why does representing functors help solving Diophantine equations?
As a category theory enthusiast I am fascinated by the fact that sometimes category theory is helpful to prove concrete things (here: solving Diophantine equations). So I'd really want to know how that works, roughly.
 A: Let me give an answer that pertains to the Diophantine equation that, according to David Speyer's answer, Lenstra was specifically talking about.
How does representing functors help solve the Diophantine equation $a^n + b^n=c^n$?
A solution to this Diophantine equation defines an elliptic curve $y^2 = x (x-a^n)(x-b^n)$ (Frey). The Galois group of the rational numbers acts on the $\overline{\mathbb Q}$-points of this curve, thus on the $\ell^m$-torsion points for each $m$. Taking an inverse limit as $m$ goes to $\infty$, we obtain a Galois action on a rank two free $\mathbb Z_\ell$-module (the Tate module).
We also obtain Galois actions on rank two free $\mathbb Z_\ell$-modules from modular forms, after Eichler-Shimura and Deligne. In fact, for many different rings $S$ we can obtain Galois actions on rank two free $S$-modules.
It turns out that the Galois representations arising from curves of the form $y^2 = x (x-a^n)(x-b^n)$ have very special properties on congruence mod $n$, properties which the Galois representations arising from modular forms cannot have (Ribet). So if we can show that every Galois representation arising from an elliptic curve also arises from a modular form, we can obtain a contradiction from any solution to the Diophantine equation.
Now here's where we introduce the functors to be represented. We consider the category of complete local rings $S$ of residue characteristic $\ell$, and the functor that sends each such ring to the set of isomorphism classes of rank two free $S$-modules with a Galois action that is congruent mod $\ell$ to some fixed Galois representation, satisfying some conditions known to hold for elliptic curves. We can consider another functor that sends the ring $S$ to only the set of isomorphism classes that arise from modular forms.
We'd like to prove the natural transformation from one of these functors to the other is an isomorphism, which is equivalent to the statement about every Galois representation arising from a modular form. In general, this is a hard problem.
But if we can represent these functors by complete local rings of residue characteristic $\ell$, then it becomes equivalent to proving that a map of local rings $R \to T$ is an isomorphism. That's a question which is much easier to tackle, because we can use all the commutative algebra theory of local rings. In particular, we can hope to prove a criterion for the map to be an isomorphism that depends on concrete properties of these rings which can be expressed in terms of the original functors. (The simplest case of this is that a map of smooth local rings is an isomorphism if and only if it's an isomorphism on the residue field and tangent space, which both have a functorial interpretation in terms of very simple rings.) We then reduce the problem to checking some new properties are satisfied by the functors. These properties turn out to be much more tractable than proving the isomorphism directly. In part, this is because they connect to areas where there is a pre-existing theory (related to $L$-functions, the class number formula, Iwasawa theory) that can be applied (though of course deep new ideas were needed as well).
A: Solving a Diophantine equation is the same thing as showing that the functor defined by a certain scheme $S$ of finite type over $\bf Z$ gives a non-empty set when evaluated at ${\rm Spec}({\bf Z})$. So it is about a functor in the first place.
Now when trying to solve that (extremely hard) problem, one will be led to study different and more tractable functors on the category of schemes of finite type over ${\rm Spec}({\bf Z})$. In order to say something about these new functors, one will wonder whether they too have geometric meaning, which roughly translates to asking whether they are representable in the same category.
As explained in Donu Arapura's answer, this is at work in Faltings's proof of the Mordell conjecture but an easier example is Buium's proof of the Manin-Mumford conjecture for curves. In this situation, one starts with a curve $C$ over a number field $K$ and one takes a prime $\mathfrak p$ of $K$, which is unramified over $\bf Z$ and where $C$ has good reduction. A property of a prime to $\mathfrak p$ torsion point of the Jacobian of $C$, which lies on $C$, is that it provides a point of the curve $C_{{\mathcal O}_K/{\mathfrak p}}$ (the curve over a finite field obtained by reduction), which lifts to an element of $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$, which has the property that it is divisible in the Jacobian by the prime number $p$ lying under $\mathfrak p$. Buium's proof shows that there can only be finitely many such points and to do this, he uses that fact that the set $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$ can be seen as the set of ${\mathcal O}_K/{\mathfrak p}$-points of a certain variety over ${\mathcal O}_K/{\mathfrak p}$, which represents a functor, which appears as an adjoint to a naturally representable functor. If one could not represent this adjoint, one couldn't understand the set $C_{{\mathcal O}_K/{\mathfrak p}^2}({\mathcal O}_K/{\mathfrak p}^2)$ geometrically and it would not be clear how to approach the statement proven by Buium.
So I would say that one solves Diophantine equations by representing functors, because a Diophantine equation is a question about a functor, which can be studied by replacing it by simpler ones. If you can show that the new ones are also representable then you will be led to another Diophantine problem and you can start all over again. This is exactly what happens in the example given above.
A: E.g. let $f(x,y, z)=0$ be a smooth projective plane curve with $f$ a rational polynomial of degree $\ge 4$. Then Mordell conjectured, and Faltings proved, that this has only finitely many rational solutions.  I hope you agree that this is a concrete statement about Diophantine equations. Faltings' original proof uses the moduli stack of principally polarized abelian varieties. This stack represents a certain functor in some sense (or in an exact sense, if you replace it by the moduli space with of ppav with level structures).
Added remarks I'm far from an expert, but I'll try to add a few words of explanation. Faltings managed to prove several conjectures; among them a conjecture of Shafarevich that given a finite set of primes $S$ in a number field $K$, the set of isomorphism classes of principally polarized abelian varieties of given dimension over $K$ with good reduction outside $S$ is finite. The relevance of the moduli stack should be clear for this. Faltings then used a  trick of Parshin to show that a counterexample to Mordell's conjecture would lead to a counterexample to the Shafarevich conjecture QED.
A: I am fairly sure the reference is to Barry Mazur's paper "An introduction to the deformation theory of Galois Representations", which is based on lectures that Mazur gave at a 1995 conference on the proof of Fermat's Last Theorem. There Mazur writes

Hendrik Lenstra, in his lecture in the conference, recounted that twenty
years ago he was firm in his conviction that he DID want to solve Diophantine equations, and that he DID NOT wish to represent functors - and
now he is amused to discover himself representing functors in order to solve
Diophantine equations!

The functors in question are indeed the one represented by Mazur's universal coefficient ring, and variants thereof.
Lenstra's lecture from the conference is available on Youtube here. It's at around 23:30. My transcription:

... the whole problem is, given your functor, can you represent it? And that was really a very hot issue in the late sixties. I remember, I think it was around 1970, I went to an algebraic geometry meeting in Oslo. Everyone was representing functors there, and they were carrying Schlessinger's paper under their arms and asking questions about it. I sort of looked at this and I decided that I wanted to do real mathematics and I started solving Diophantine equations. Oslo is a great city for solving Diophantine equations. And nowadays we know that, if you want to solve Diophantine equations, you have to start by representing a functor, so that's what I'm doing today.

Of course this isn't an answer to "why does representing functors help solving Diophantine equations?"; perhaps someone else would like to attempt that.
