Solar stocks have been on fire recently after Germany shocked the industry with record installations to end 2011 and an analyst predicted worldwide demand of 30 GW in 2012 and 40 GW in 2013. Suddenly the beaten-down sector has become popular again with investors.

The 30 GW prediction isn't a stretch considering that Bloomberg New Energy Finance says that up to 29 GW of solar were installed in 2011. What is turning heads is where that demand may be coming from.

For years Europe has dominated the solar landscape, with Germany at the forefront. But a feed-in tariff cut began on the first of the year, and another expected cut mid-year could put a damper on demand. Of course, Germany has surprised us before, so I wouldn't be surprised to see in excess of 5 GW built there. The surprise is that China may actually surpass Germany as the world's largest solar installer this year.

How big can China get?
China has said it will install 3 GW of solar this year in a growing effort to build cleaner electric generation. But analysts have set their sights even higher.

Aaron Chew from Maxim Group says China will install more than 5 GW next year, and has heard predictions north of 7 GW. That would be great news for the biggest Chinese manufacturer, Suntech Power (NYSE: STP), as well as leading Chinese manufacturers Trina Solar (NYSE: TSL) and Yingli Green Energy (NYSE: YGE), who have seen their stocks pummeled over the past year.

And China hasn't shied away from using non-Chinese modules as well. First Solar (Nasdaq: FSLR) has a 2-GW project in the works, and although local manufacturers will likely have an advantage, the global market for solar modules means Chinese demand will help everyone.

Profits will return
If China does become an installation powerhouse, the question then becomes: When will these companies return to strong profitability? One of the reasons installations did so well in Germany to end the year was extremely low module prices, which led to lower installation costs and higher returns for installers. The elasticity of demand is high in solar, so analysts still don't think module prices will rise in any notable way, leading to profits for manufacturers.

But we have to remember that many manufacturers were operating at extremely low utilization rates the last time they reported earnings. First Solar anticipated a $0.05-per-watt impact for underutilization in 2012. Simply returning to a higher level of operation will help bring up gross margins and should bring manufacturers further into profitability.

China may save the day
If China can install even 5 GW of solar in 2012, it could be enough to keep the strongest manufacturers afloat. A shakeout among weaker manufacturers is still likely because capacity is expanding, but that is healthy for the industry in the long term.

For another energy stock our analysts think is a long-term winner, check out our free report "The Only Energy Stock You'll Ever Need." It's available for a limited time.