Some of the best solar companies in the world are having a rough go of it in 2016. Missed guidance at SolarCity (NASDAQ:SCTY.DL) has called into question the residential solar market, SunEdison's bankruptcy was a black eye for the industry, and the fall in yieldcos could hurt First Solar (NASDAQ:FSLR) and SunPower (NASDAQ:SPWR).

FSLR Chart

FSLR data by YCharts.

But the long-term future of solar should be very bright, which is why investors should be asking themselves if SolarCity, SunPower, and First Solar are now bargains.

Elon Musk's solar bet isn't paying off

One of the hardest-hit stocks this year is SolarCity. The company badly missed its own fourth-quarter 2015 and first-quarter 2016 installation guidance, and rising sales and financing costs have called into question the company's value creation.

A new loan product should help bring the company up to speed with smaller competitors that are selling solar power systems with loans at lower overall costs than SolarCity's traditional leases. It's a business model change that may be painful, but it's necessary as the industry evolves and customers become more knowledgeable about solar. One of the reasons SolarCity's leases were so popular a few years ago was that customers didn't really understand solar, and they viewed its $0-down option as a no-risk investment. Today, $0 down on a loan is a better deal.

Given SolarCity's inability to hit its own targets, this isn't a stock I would be willing to jump into right now. But watch the company's performance through the balance of the year, because if it can get operations on track, there could be long-term value in SolarCity. 

Image source: SunPower.

Playing the long game

SunPower's past growth figures aren't going to knock anyone's socks off, but the company could be better-positioned to win long-term in the solar industry than anyone. Time and time again, manufacturers have proven that it's easier to cut the costs of making a solar panel than it is to make a fundamentally more efficient one, and SunPower is starting with the most efficient panel in the industry.

SunPower has also built fully engineered solutions for residential, commercial, and utility-scale solar installations, adding monitoring, energy storage, energy management, and even cleaning capabilities. This sets the company up well to adapt and compete as the needs of renewable energy projects -- large and small -- change.

Finally, SunPower has a balance sheet that will allow it flexibility in building projects. At the end of the first quarter, the company had $579.8 million in cash and $1.2 billion in projects on its balance sheet, plus the ability to add debt to build projects. And it can sell the systems on the balance sheet to yieldco 8point3 Energy Partners or to third parties. Financial flexibility is key in solar, and SunPower is one of the best positioned companies in the industry on that front.

With its shares trading at just 9.4 times forward earnings estimates, and management expecting to triple solar panel production and double EBITDA by 2019, I think SunPower is a great stock for long-term investors. 

Image source: First Solar.

Slow and steady wins the race

First Solar hasn't been hit quite as hard as SolarCity and SunPower this year -- and for good reason. First Solar is the most profitable of these companies, and it has a long history of making money building large-scale solar projects.

One reason I think First Solar shares have tumbled this year is uncertainty over its business outlook for 2017. Utilities have been slow to sign new power purchase agreements after the extension of the solar investment tax credit beyond 2016. So, there's uncertainty, but that will likely be a blip in the company's operations.

Long-term, investors should consider First Solar's focus on increasing panel efficiency and its reduction of installation costs toward $1 per watt. Progress on both fronts will help keep the company ahead of competitors and winning contracts to build large-scale solar power plants. That will keep the profits rolling in as well, meaning a recovery should be on the horizon for this solar bargain.

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.