From Brian J. Wise:
The president won, not based on the strength of his record (weak), his agenda (more of the same), or because of the shifting priorities of a nation (jobs and the economy are still number one). He won because of the misallocation of resources by Republican donors, party committees, and third party groups.
Democrats have for 16 years excelled at voter mobilization and voter turnout. As a party they embraced technological advances and social media much more quickly and effectively, and have been buoyed by longtime allies such as labor unions that have mastered community organizing and get-out-the-vote tactics. Democratic voter mobilization in urban and suburban areas and their ability to turn out targeted demographics helped propel the president to a second term.