SunPower (SPWR -13.37%) watched its bottom line fall deep into the red in 2011 and 2012. Last year, however, it managed to get itself back into the black, earning $0.70 a share as it continues to take a leading roll on the technology front. China's Suntech Power Holdings (STP), on the other hand, is still winding its way through bankruptcy, after its debt burden proved too onerous as solar panel prices fell. There's a huge solar opportunity, but not every company can be an industry leader.

Too much debt
Suntech's big problem was a high debt load at a time when the price of solar panels was falling. Increased competition, oversupply, and improving technology all helped lead solar panel prices lower. Lower selling prices mean lower revenues, and that eventually led to a missed payment on a convertible bond -- thus the spiral into bankruptcy even though it was one of the largest solar panel makers in the world. But Suntech, which is hoping to get financing that will allow it to come back from its troubles, is hardly alone.

(Source: ReubenGBrewer, via Wikimedia Commons)

Other companies that have fallen on hard times include Solyndra, whose bankruptcy ensnared the White House because of government funding, and Germany's Q-Cells, that eventually sold itself. Although early in the industry, they weren't able to differentiate themselves and/or had leveraged themselves to the point where they couldn't handle falling prices.

But falling prices shouldn't have come as a surprise. According to Bloomberg, solar cost roughly $76.00 a watt in 1977 and just $0.74 a watt last year. Price declines are really just the continuation of a long-term trend. In fact, some industry watchers expect prices to fall to as little as $0.36 a watt by the end of 2017. That could easily lead more high-cost and heavily indebted manufacturers into trouble.

The downward pricing trend is a big reason why you should be careful when investing in this space. In fact, such fast-paced change helps explain why Japan's Sharp Corp. (SHCAY -1.56%) is rumored to be seeking a buyer for its Recurrent Energy division, which develops solar projects. The company appears to be dropping out of some solar markets so it can right its struggling Japanese solar business. For example, Sharp no longer makes solar panels in the United States or United Kingdom, and exited an Italian solar venture, too. Spreading itself too thin seems to have left Sharp without a competitive edge--anywhere.

Where to go?
So where are the opportunities? SunPower is one company worth a deeper dive. It has been steadily decreasing its manufacturing costs while at the same time improving the performance of its solar panels. That gives it a cost and technology edge over the competition. In fact, it was able to reduce costs by 20% or more in 2012 and 2013. And now that it's back in the black, the company looks to be on more stable footing.

Adding to the allure, SunPower has a global reach, servicing both the utility scale market and the rooftop solar space. Although you'll need to watch solar panel prices closely if you invest here, SunPower has proven itself to be a technology leader in the industry and a price war survivor.

Another company worth watching is SolarCity (SCTY.DL), which is backed by Elon Musk. It is the largest U.S. installer of rooftop solar systems with a 29% share of the market. That's larger than the next nine competitors combined. It's been able to lower its installation costs nearly 30% since the end of 2012 as its customer base has expanded an incredible 99% annually since 2009. Not only does its scale give it an edge on lowering installation costs, but also on the sales front because of its name recognition.

(Source: BrokenSphere, via Wikimedia Commons)

Historically, SolarCity has focused just on installations, but it recently entered the panel making market with the purchase of Silevo. And like Tesla Motors' (TSLA 1.50%) plan to build a giant battery factory under Musk's leadership, SolarCity is looking to build a giant solar panel factory. It recently agreed to break ground in New York.

Although there are clear risks as SolarCity gets into the competitive solar manufacturing market, there are things to like about the bold move, too. For example, the ability to guarantee access to solar panels in a fast growing market. Driving panel costs lower is high up on the list, too. That said, SolarCity is losing money today and big spending plans won't help change that trend. So this is a longer-term story that's most appropriate for growth-minded investors, but its impressive leadership position in the rooftop solar market will make it hard for competitors to catch up.  

Competitive advantage
The solar industry is relatively young, but changing very fast. For companies with competitive advantages in technology and/or scale, the future looks pretty bright. SolarCity and SunPower both fall into that category. Those that can't differentiate themselves or that can't handle the industry's trend toward lower selling prices, however, could easily fall to the wayside.