When Kummer started working on research problems,he tried to solve what became known as "Kummer's problem", i.e., the determination cubic Gauss sums (its cube is easy to compute). Kummer asked Dirichlet to find out whether Jacobi or someone else had already been working on this, and to send him everything written by Jacobi on this subject.
Dirichlet organized lecture notes of Jacobi's lectures on number theory from 1836/37 (see also this question), where Jacobi had worked out the quadratic, cubic and
biquadratic reciprocity laws using what we now call Gauss and Jacobi
In his first article, Kummer tried to generalize a result due to Jacobi, who had proved (or rather claimed) that primes $5n+1$, $8n+1$, and $12n+1$ split into four primes in the field of 5th, 8th and 12th roots of unity. Kummer's proof of the fact that primes $\ell n+1$ split into $\ell-1$ primes in the field of $\ell$-th roots of unity (with $\ell$ an odd prime) was erroneous, and eventually led to his introduction of ideal numbers.
After Lame (1847) had given is "proof" of FLT in Paris, Liouville had
observed that there are gaps related to unique factorization; he then
asked his friend Dirichlet in a letter whether he knew that Lame's assumption was valid (Liouville only knew counterexamples for quadratic fields). A few weeks later, Kummer wrote Liouville a letter. In the weeks between, Kummer had looked at FLT and found a proof
based on several assumptions, which later turned out to hold for
regular primes. Kummer must have looked at FLT before, because in
a letter to Kronecker he said that "this time" he quickly found the
The Paris Prize, as John Stilwell already wrote, did play a role for Kummer, as he confessed in one of his letters to Kronecker that can be found in Kummer's Collected Papers. But mathematically, Kummer attached importance only to the higher reciprocity laws.
Kummer worked out the arithmetic of cyclotomic extensions guided
by his desire to find the higher reciprocity laws; notions such
as unique factorization into ideal numbers, the ideal class group,
units, the Stickelberger relation, Hilbert 90, norm residues and
Kummer extensions owe their existence to his work on reciprocity laws.
His work on Fermat's Last Theorem is connected to the class number
formula and the "plus" class number, and a meticulous investigation
of units, in particular Kummer's Lemma, as well as the tools needed
for proving it, his differential logarithms, which much later were
generalized by Coates and Wiles. Some of the latter topics were helpful to Kummer later when he actually proved his higher reciprocity law.
Here's my article on Jacobi and Kummer's ideal numbers.