It's not like the Franks hadn't had effective cavalry during the Migrations, or even before them, as much as about any other bunch of marauding Germanics (not counting the horse-heavy, steppe-influenced eastern ones). They just hadn't had the need to specifically focus on it, as infantry worked right well for most of their needs.

The Carolingian period kind of changed things. First there was the Moors. Charles Martel may have beaten back their recon-in-serious-force and they might have fallen to internecine bickering since then, but that didn't keep them from carrying out smaller raids out of Iberia and the occasional bridgehead in Italy or the southern French coast, naturally chiefly done by fast-moving mounted men. Then the Vikings turned up on the seas, and introduced a different kind of fast-moving pillager. To top it off there were first the Avars and later the Hungarian-Magyars, steppe peoples with a penchance for mounting major raids deep into Europe on horseback.

Infantry wasn't good enough to deal with these menaces as it just couldn't catch them reliably. That meant cavalry had to be emphasized. Heavy cavalry, as lighter kind would tend to be outmatched or unable to make a dent in Viking lines. But heavy cavalry is damned expensive, and for states with rather primitive adminstrative and economical structures one of the best ways of meeting this cost is to feudalize the lot so they essentially take care of it themselves. On the downside this tends to move power increasingly into the hands of the feudal landlords as they control a large part of the society's chief source of income and sustenance, and the feudal cavalry contignents they raise and maintain tend to be more loyal to them than some remote king. Moreover, as among the more effective ways to curb the maneuvering room and looting of raiders is liberal and judicious use of fortifications to control terrain, defend settlements and so on, whoever ends up garrisoning those fortifications tends to pretty much control the given region even if he doesn't press the matter.
And as he's now holed up in a network of fortified places manned by his private army he's suddenly become awfully difficult to coerce to anything...

By what I've read of it the peculiar European shift towards decentralized feudalism and feudal heavy cavalry came about quite specifically as a means of regional defense against strategically mobile raiders; it more or less worked, but with the annoying side effect it made the feudal barons rather strong and any central authority rather weak. Diverse monarchs would spend the next half a millenia trying to regain factual control of what was nominally their land.

The stirrup had little to do with the matter. All the major types of cavalry - horse-archers both light and heavy, skirmishers, heavy shock - were already around and effective long before the device. It just made their life a whole lot easier, and as a side effect is AFAIK a necessity for the couched-lance technique the Europeans went for bigtime upon learning of it and eventually pushed it to its utmost potential - and then found it to be a tactical dead-end.