Money doesn't buy elections, as evidenced by Obama being vastly outspent in 2012... But it sure as hell helps
Obama was not vastly outspent in 2012.
In the aggregate (campaigns, PACs, outside spending, etc), I believe he was. Or maybe it was the other way around (Romney's campaign raised more than Obama's)? I can't recall which, but he was outspent in one of those two categories.
EDIT: It was the aggregate presidential spending. Romney had a huge advantage in outside spending that gave him the overall edge.