So John McCann did run on reducing fossil fuel usage and promoting a greater mix of energy technologies but I wouldn't say that changed by 2012 per se. McCain himself was the anomaly that didn't match earlier or later candidates. For example, Bush did open up ANWR to drilling, even though that was purely symbolic and nobody is going up there to drill or has done in the 20 intervening years (apart from some minor exploratory drilling by Chevron).
Also, I'd say McCain's policy was more based on a national security argument than a climate argument. As others have pointed out, fracking changed everything. In 2008 we were a huge net importer of oil. Now we're a huge net exporter.
Mines (including oil wells) are huge wealth concentrators. A handful of very wealthy people benefit hugely from resource extraction. And the US government, as a whole regardless of party, represents the interests of large corporations both domestically and overseas.
Anyway, Bush (either one) didn't run on renewable energy. Neither did the candidates that came after. 2012 was just a reversion to mean.