Lucas has said money was one of the motivators. His company was doing okay in the 1980s, but they had to work hard creating new products without any more Star Wars movies or toys. They diversified, created LucasArts, Skywalker Sound and Pixar, which they then sold, plus they started creating tv cartoons and tv films, as well as Disney Land attractions. But a lot of them were in shaky shape because they were still new. ILM was luckily doing fine, but Lucas also made some bad investments in films that didn't return much profit, like Twice Upon A Time, Howard the Duck and Tucker.
So, it was only in the early 1990s that Lucasfilm started stabilizing and making good profit. This coincided with the Star Wars rebirth starting with Heir to the Empire and Dark Empire. That huge resurgence of Star Wars merch lifted Lucasfilm from doing reasonably well to doing very well. By the mid-1990s, Lucasfilm now was making enough money to finance a feature film on it's own, which was Lucas' goal, to return to directing using his own money. So, he looked, and he was faced with this: he could put all his money into some weird original film he wanted to make, but if it wasn't a financial success that would kind of be it, Lucasfilm would have to struggle again to get themselves back to that position. But if he took that same amount of money and made a Star Wars prequel, it would guarantee to double Lucasfilm's income, so that they wouldn't have to worry about whether something flopped or not. That's one reason that Lucas made Phantom Menace so kid-friendly--if the film flopped it was all the money the company had at the time.
Unfortunately, Lucas never got around to doing the OTHER things that the prequels were designed to financially secure. I think he just got tired, lazy, and afraid of challenging himself. So, he made the prequels because they would make him the most money, but then he just sat on the money and made more Star Wars spin-offs, so he essentially ended up doing just to get himself richer.
There's a good exchange from him and Charlie Rose in 2004:
Lucas: At the same time, my kids are getting older now. That’s why I got to go back and do more Star Wars. And when I went back to do more Star Wars I had a very soul-searching discussion with myself about “should I go off and do these three Star Wars or should I go off and do these other movies that I want to do?” And now my kids are old enough that I can go back and direct movies—which is what I wanted to do. And I opted for the Star Wars thing because again it was one of these “well, the opportunity is there and I think I’d be foolish not to do it... I decided one of the reasons to go back to Star Wars was that it would hopefully make me financially secure enough to where I wouldn’t have to go to a studio and beg for money... That’s what I’ve earned. That’s what I’ve been struggling for all of these years in the end, to be able to do what I want to do without a lot of corporate interference and craziness. And I felt strongly enough about it to where I dedicated myself to getting to a point where I could be independent enough to not have to go down the path of compromise for the sake of somebody who isn’t really that interested in what you’re doing anyways.
Charlie Rose: But are you saying you just got to that point?
Lucas: Pretty much. I’ve always had to invest everything in what I’ve been doing. So, like with all the Star Wars films, I took everything I made out of Star Wars and invested it in Empire Strikes Back. I took everything that I made in Empire Strikes Back and Star Wars and I put it into Return of the Jedi. When I finished all of that, unfortunately I got a divorce and that sort of set me back quite a ways. So then I had to kind of start over again. So then it took me six years to get back to point where I was financially even. And build my companies up. And then I started working again. And then I decided one of the reasons to go back to Star Wars was that it would hopefully make me financially secure enough to where I wouldn’t have to go to a studio and beg for money. And so I took all the money that I had at that point and I invested it in The Phantom Menace, and then I did the other one [Attack of the Clones] and now I’ve got it all in this one [Revenge of the Sith]