The high point of Greek number theory was the determination of all Pythagorean triples by Euclid [15, Book X, Lemmas 1,2; in v. 3, p. 63f,] and Diophantus. The motivation was of course geometric, namely to determine all right triangles with integer sides, via the Pythagorean Theorem. Diophantus' Arithmetica [9,14,22] inspired Fermat to conjecture in the margin of his copy what is now known as Fermat's Last Theorem, arguably the most famous open problem in all of mathematics. (Fermat's annotation can be found in [10, p. 2,] [11, p. 218,] [20, p. 213,].)
Fermat probably could prove the conjecture for n < 5, but it was left to Euler to publish the first explicit proofs (which contained a gap for n = 3). Euler's proof for n = 4 [21, pp. 36--37,] is quite accessible, using Fermat's method of ``infinite descent'' to reduce the problem to the determination of Pythagorean triples. (See e.g. [10, pp. 5--7,] for a rigorous classification of all Pythagorean triples.)
The problem subsequently has had immense impact on the development of algebraic number theory and algebraic geometry. Examples of modern approaches are the use of complex roots of unity to factor the equation in various subfields of the complex numbers, and a reformulation in terms of algebraic geometry by considering rational points of curves. A good reference for modern developments is .