Here is a fascinating blog post by Ronald Brownstein. Key paragraphs (boldface added):

Obama's strength among young people has a second, even more significant, implication: if Republicans cannot reverse it reasonably soon, it could harden into a lasting preference for Democrats in this huge generation. Political scientists and political strategists generally divide into two camps over how partisan allegiances are formed. The lifecycle camp argues that people's views change at different points in their life, with many voters, for instance, becoming more averse to taxes as they acquire families and mortgages. Surely some of that occurs; few people's political preferences are entirely static or so deeply held they cannot be disrupted, at least temporarily, by events.

But probably the dominant camp believes partisan allegiances are forged mostly by the social, economic and political experiences that shape a generation's upbringing. As Winograd and Hais wrote, "Members of the electorate are most easily persuaded when they are young, before their beliefs harden into attitudes they will retain throughout their lives." Kristen Soltis, director of policy research at the Winston Group, a Republican polling firm, has studied young people and politics, and she largely agrees. "I fall into the camp that see it as more generational—that there are period effects that come into play when someone becomes [politically] active, and that colors the way you look at politics throughout your life," she said.

Obviously, neither "camp" (i.e., theory) explains everyone. Some people, such as William Ayers, retain the beliefs, values, and worldview that they formed during their adolescence. Others, such as David Horowitz, change when they reach middle age. I'm one of the latter. Many of my former friends and colleagues would say that I'm a turncoat. I prefer to think that they're in a state of arrested development.