Image source: Getty Images.

This article was updated on Nov. 16, 2016, and originally published June, 13, 2016.

The solar industry is one of the most volatile areas of the stock market, and despite the industry's growth, it's been a tough place for investors to make money. But long term, this should be a gold mine for investors who can make the right investments and hold onto them through thick and thin.

The best examples are the performances of three of the biggest companies in the industry: First Solar (NASDAQ:FSLR), SunPower (NASDAQ:SPWR), and SolarCity since the latter company's IPO. It's been a rocky ride for investors, no doubt, but all three companies outperformed the market over most of the last four years, despite recent troubles. But the winners of the past may not always be the winners of the future, and a durable competitive advantage is key in today's market. Which companies should investors be looking at buying today?

FSLR Chart

FSLR data by YCharts

SunPower: The chameleon of solar

One of the challenges in the solar industry is that geographies go from boom to bust rather quickly. Germany, Spain, Hawaii, and even Nevada have gone through these cycles, and depending on how the industry unfolds, that trend will likely continue.

SunPower has the most diverse customer base of all major solar companies, with exposure to nearly every market internationally, as well as everything from small residential systems to large utility projects. And its business is based on the most efficient solar panels in the industry, which allow SunPower to create more power from a given plot of land than anyone else.

As the solar industry evolves, the opportunities to exploit in solar will change, and no company is more prepared for that change than SunPower.

First Solar: the big solar company

First Solar is an equally powerful solar company, but it focuses primarily on building large utility-scale projects. Even though results can be choppy, the company has the proven ability to make a lot of money building projects long-term.

FSLR Net Income (TTM) Chart

FSLR Net Income (TTM) data by YCharts

What makes First Solar attractive today is that it has a strong balance sheet with which to build projects and sell them as needed, and it is improving efficiency, packing more energy production into a smaller space. Efficiency was once First Solar's weakness against competitors, but today it's pulling ahead of commodity Chinese suppliers, giving it a bright future.

The steady solar company

One company that provides more consistent returns is 8point3 Energy Partners (NASDAQ:CAFD), a yieldco formed by SunPower and First Solar. The company owns projects with long-term contracts to sell energy to utilities, and with the resulting cash flow it pays a dividend to investors.

What differentiates 8point3 Energy Partners from other yieldcos are its dual-sponsor structure and a conservative balance sheet without any project-level debt. The dual-sponsor structure ensures the company won't overpay for projects to support its sponsors, and the balance sheet keeps it out of trouble financially.

With long-term contracts, the 6.3% dividend yield is both high and likely to grow for at least the next two years, given projected project acquisitions. If you're looking for a more stable solar stock than SunPower or First Solar, this is the one to buy.

High potential and high volatility

Long-term, the solar industry has a lot of potential and should provide good returns for investors if they can pick the right stocks. But considerations like geographic diversity, balance sheets, and competitive differentiation are important, which is why SolarCity isn't among my top three stocks to buy today.

Keep in mind that no matter where you invest in solar, it will be a bumpy ride, as we've seen already in 2016. With that said, these are still three solar stocks I would be very comfortable buying right now.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.