The solar industry has had its share of ups and downs the past few years. Over capacity, excessive leverage, and other concerns had dimmed the sector's outlook, causing steep declines in solar stocks, evidenced by the more than 45% plunge in the Guggenheim Solar ETF (NYSEMKT:TAN) -- which tracks the MAC Global Solar Energy Stock Index -- over the past three years. That said, the outlook for solar has brightened this year, which has taken solar stocks, and the Guggenheim Solar ETF, up sharply. 

That said, even with the sector's recent rebound, we think it still has plenty of room to run. Three stocks that we're bullish on as we head into the third quarter are SolarEdge Technologies (NASDAQ:SEDG), First Solar (NASDAQ:FSLR), and TerraForm Power (NASDAQ:TERP). Here's why we like their prospects both for the near and long term. 

Solar panels absorbing the suns energy on hot summer day.

Image source: Getty Images.

Picking the profitable pockets of the solar industry

Tyler Crowe (SolarEdge Technologies): Perhaps the biggest challenge for anyone investing in the solar industry is grappling with the fact that manufacturing solar panels is a race to the bottom. The immense strides the industry has made in lowering the per watt cost of solar power means they have poured millions into R&D for better technology and better manufacturing processes. The downside is that the value of panels quickly becomes commoditized, and manufacturers have little to no pricing power.

This is what makes SolarEdge Technologies an intriguing solar stock worth watching in the coming quarters. The company doesn't build panels. Rather, it produces components that optimize power output and inverters that turn the DC power from panels into the AC power upon which almost all buildings and appliances run. There are some immense benefits to this from an investor perspective. One is that SolarEdge's business is panel agnostic, so it doesn't have to worry as much about which company has the best panels at any given moment. Also, SolarEdge has relative pricing power. Over the past few quarters, sales have declined commensurate with the drop in solar panel installations, but it has been able to maintain its better-than-30% gross margins throughout this cycle. This suggests the company isn't subject to the fierce pricing war that has sent so many panel producers into bankruptcy.

SolarEdge is by no means a perfect solar stock, but it does have some qualities you want in this industry. Shares of SolarEdge currently trade at 22 times earnings, so it's not a cheap stock. If the company can maintain its pricing power while riding the solar boom, then SolarEdge is a stock worth putting on your radar. 

This solar giant's earnings showed why it's worth buying and holding

Jason Hall (First Solar): While thin film solar panel giant First Solar already announced its third-quarter results (and crushed expectations), it's absolutely still one of the top solar stocks worth buying. Yes, even after already climbing over 50% since the beginning of the year, an incredible 88% since the lows in April, and 10% since announcing earnings a few weeks ago, First Solar still deserves to be near the top of your list. 

And in short, it's because First Solar is still attractively valued, it has several huge competitive advantages over many of its peers, and its management team has done an incredible job of managing and allocating capital. 

At last count, First Solar had more than $1.65 billion in cash and equivalents on its balance sheet and less than $300 million in debt, giving it a huge margin of safety while the solar industry rebalances cyclical demand. And the company is putting that money to work, accelerating development of its next generation of panels, with plans to bring them to market early in the next upswing of the cycle. 

Furthermore, the company reported stronger profits than expected and revised full-year guidance upwards significantly. And when it comes to valuation, First Solar is probably cheap, carrying almost half of its market cap in cash and investments, and trading for between 22 times and 32 times guidance for full-year earnings, and less than 10 times peak earnings before the current cyclical slowdown. Considering the upside in the years to come, now's an excellent time to invest in First Solar. 

Solar panels generating power on a sunny day.

Image source: Getty Images.

A new parent means better opportunities to grow

Matt DiLallo (TerraForm Power): Investors in renewable power yeildco TerraForm Power have gotten burned in recent years because its former parent company went bankrupt due to excessive leverage, which had cast a shadow on the company's future. That said, TerraForm Power recently secured a new sponsor after Canadian alternative asset manager Brookfield Asset Management (NYSE:BAM) agreed to become a cornerstone investor by taking a 51% stake in the company.

That sponsorship agreement provides several benefits to TerraForm. First, Brookfield will provide the company with a $500 million equity line to support acquisitions. Further, the company has the right of first refusal to buy up to 3,500 MW of wind and solar assets that Brookfield has under development. Finally, TerraForm can leverage the financial strength of Brookfield to gain greater access to the capital markets for financing future deals.

That combination of cheaper access to funding and a visible pipeline of growth opportunity has brightened the outlook for TerraForm Power. That's one reason why the stock is up more than 10% since the transaction announcement. That said, it's still down more than 50% over the past three years, suggesting that there's plenty of upside as Brookfield repositions the company when it takes control later this year, with the reinstatement of its dividend being a significant future catalyst. That brighter outlook makes TerraForm a compelling solar stock to consider buying as we enter the third quarter.

Jason Hall owns shares of First Solar. Matt DiLallo owns shares of Brookfield Asset Management and First Solar. Tyler Crowe owns shares of Brookfield Asset Management and First Solar. The Motley Fool recommends First Solar. The Motley Fool has a disclosure policy.