Solar energy stocks have been an up-and-down segment of the market for more than a decade. The industry is growing installations rapidly, but there's so much competition and pressure to lower costs that few companies have been able to make money. 

As the industry becomes more mature, I think a handful of companies are emerging as long-term winners, and my picks right now are SunPower (NASDAQ:SPWR), Vivint Solar (NYSE:VSLR), Canadian Solar (NASDAQ:CSIQ), and SolarEdge Technologies (NASDAQ:SEDG)

Large solar farm in the desert.

Image source: Getty Images.

SunPower

Few companies have been through as many ups and downs in the solar industry as SunPower. The company has always made the most efficient solar panels on the market, but it has chased after business models like solar farm development that failed and seen commodity solar cells drop in price so far that it can't compete as effectively as it would like.

What's changed today is that SunPower's A-Series solar panel technology, which uses larger solar cells and an improved production process, has now hit the market. According to management, the solar panel will be much closer to commodity manufacturing costs than older E-Series panels and will be more efficient as well. That will help improve margins in the traditional manufacturing business. 

On top of manufacturing, SunPower is offering intriguing services to installers of residential and commercial solar projects. The company is making energy storage that ties into the solar system and provides smart services to the building owner and the grid. It's also introducing a quoting tool that will allow homeowners to design their solar project in about a minute, even calculating cost savings on their energy bill. 

SunPower hasn't yet returned to profitability, so it isn't a value by traditional metrics, but it has a durable technology advantage, and the long-term investments it's making should pay off with better margins and a larger share of the solar industry. 

Vivint Solar

Vivint Solar is the second-largest solar installer in the U.S. with 56 MW of solar installed in the second quarter and 1,163 MW installed in its history. Most of the company's customers sign long-term lease or power purchase agreements to pay for their solar installation. Vivint Solar then sells some of the tax benefits and cash flows, keeping the rest as value on the balance sheet. 

Management calculates the value it holds as retained value, which currently stands at $9.62 per share, above Vivint Solar's current share price of $8.28 as I'm writing. So it's easy to argue that Vivint Solar's shares are a value today. 

What I really like about the company's position is that it's going to be adding services and features like energy storage to the mix. As it does, it'll be selling energy as a service, extracting value from both the homeowner and the grid through mechanisms like demand response and capacity auctions. 

Given the value and upside as an energy service provider, Vivint Solar is a great stock to bet on in solar energy. 

Canadian Solar

The solar manufacturing business has been a battle between Chinese manufacturers to reach scale and lower costs faster than anyone else. The winner appears to be Canadian Solar, who has more manufacturing capacity than any other publicly traded company with shipments of 8.4 GW to 8.5 GW expected this year. What's most impressive is that the company has remained profitable and is now seeing an increase in margins as solar demand improves. 

CSIQ Revenue (TTM) Chart

CSIQ Revenue (TTM) data by YCharts

Manufacturing will be a tough business for a while, but Canadian Solar has built scale that few can match and also has a valuable solar development arm that brings captive demand and some high-margin sales. Given its history, this is a solar company I wouldn't bet against. 

SolarEdge Technologies

Another company that has proven the ability to make money over time is SolarEdge Technologies. The company started as a manufacturer of power optimizers for residential solar systems and is now moving into products like inverters and energy storage. What's impressive is that it's added these products and kept on growing both the top and bottom lines. 

SEDG Revenue (TTM) Chart

SEDG Revenue (TTM) data by YCharts

SolarEdge's stock is far from cheap at 35 times trailing earnings, but the company has shown the ability to innovate and grow the business over a long period. That's why I think it will remain one of the biggest winners in solar over the long term. 

Different ways into the solar industry

Each of these companies is focused solely on the solar industry, but they all have different strategies. SunPower is gearing its products toward residential and commercial customers willing to pay a premium for the best products, Vivint Solar is the installer and financier for residential customers, Canadian Solar is a world-class solar panel manufacturer, and SolarEdge is a valuable component supplier. Each is a leader in its own segment of the industry, and that's why I think they're all great buys today.