But the optimism quickly darkened in the aftermath. In the days following the election, renewable energy stocks fell, along with the broader market.
The future isn't looking much brighter. Powerful forces are aligned against the renewable energy industries, that are likely to hold growth back.
Worldwide, Bloomberg New Energy Finance is expecting to see a 12% decline in the growth rate for wind power in 2013 and an 8% decline in solar's growth, using conservative estimates.
Government support: In the United States, one of the largest hurdles facing the industry is the expiration of years of government support that was seriously boosted by Obama's $787 billion stimulus program.
Multi-billion dollar grants and loan guarantees that were part of the stimulus -- like the one that supported the now bankrupt Solyndra -- are basically over.
Even tax credits that the industry has relied on for years -- which cover about 30% of a wind or solar projects' cost -- are no longer a sure thing. The wind industry's tax credit is set to expire at the end of this year.
Analysts believe retaining tax credits for any type of energy will be a hard fight during upcoming negotiations over the federal budget and fiscal cliff.
"Even if that battle is won, it is very unlikely that you will see an increase in support," said Sarah Ladislaw, an energy analyst at the Center for Strategic and International Studies. "It's like an all-out battle for the status quo."
Generous subsidies are also being phased out in Europe as deficits become a mounting problem.
Cheaper alternatives: Renewables face another hurdle in the form of cheap natural gas, which can be burned to create electricity. This is particularly true in the United States, where widespread use of hydraulic fracturing -- or fracking -- has led to an overabundance of natural gas and pushed prices to 10-year lows.
Analysts say natural gas prices would have to nearly double to make wind -- which is cheaper than solar -- once again an attractive choice for utilities. Natural gas prices are expected to rise in coming years, but not significantly until a stronger economic recovery takes hold.
State mandates: The wind and solar business has yet another obstacle to growth: the fulfillment of state mandates.
A few years back, about half the states passed laws stipulating that a certain percentage of a states' power -- usually somewhere between 15% and 30% -- come from renewable energy. Many of those mandates have now been met, according to Ethan Zindler, head of North American research at New Energy Finance.
The silver lining: While growth is expected to slow in 2013, the industries will continue to grow.
There have been many high-profile bankruptcies -- especially in solar -- over the last few years, and stock prices have plummeted. But the investor bloodbath has more to do with falling prices for solar panels that squeeze profits. The world (read: China) has simply gotten much better at making cheaper panels.
While that's bad for the hundreds of solar panel companies that have to compete in this tight market -- especially those that were making more high-tech panels like Solyndra -- it's good for the adoption of solar power in the long run.
For example, the average price of solar power in the United States has dropped to 15 cents per kilowatt hour, from 40 cents two years ago, according to the Energy Information Administration. That's still significantly higher than natural gas, which only costs 6 cents per kilowatt hour.
"Prices have come down so dramatically over the last few years that, even without subsides, it makes sense in some places," said Mark Bachman, a solar analyst at Avian Securities in Boston.
On the wind side, costs are coming down as well.
That's partly why New Energy Finance is predicting rising growth rates for wind and solar once again in 2014.