First of all, Romney was a weak candidate. Everybody knew this, but we forgot after one 90-minute debate performance. He actually made us believe and gave us hope, for awhile. Even after he blew the second debate and laid down on the third, we thought Romney would still prevail.
Obama had a weak hand, but played it well. Romney misplay almost every card. Team Romney let Obama get by with the worst lies, let Obama blame Bush for his failures and never defended conservatism, liberty or free markets.
Honestly, I think anti-Mormon prejudice was a contributing factor in the loss as well.