Shares of solar panel manufacturer First Solar (FSLR 1.46%) have significantly underperformed those of its peers in the past five years. The stock rose only 15% in five years, compared to JinkoSolar's (JKS 0.42%) more than 100% rise and Canadian Solar's (CSIQ -0.34%) 146% rise during the same timeframe. Increased competition and substantial margin pressure have made investors concerned about the company's growth potential.

It has also impacted First Solar's top line. In five years, First Solar's revenue fell by an average rate of around 5%. By comparison, JinkoSolar has been growing its revenue rapidly. Despite these concerns, First Solar stock is an attractive buy right now. Here are three great reasons why.

1. First Solar's gross margins have improved

One of investors' key concerns is the increasing margin pressure on panel manufacturers due to increased competition and commoditization of solar panels. It has resulted in lower gross margins for First Solar, and for two years they remained lower than those of its top competitor, Canadian Solar. This, however, changed last year. Meanwhile, JinkoSolar has targeted to increase its sales at much lower margins.

FSLR Gross Profit Margin Chart

FSLR Gross Profit Margin data by YCharts

As the above graph shows, First Solar's gross margins have been trending upwards lately. The company is exiting the solar projects development business due to low returns and plans to focus and expand its panel manufacturing business instead. The fall in the company's revenue in the last couple of years is largely attributed to lower project sales. In comparison, the company's modules segment sales continue to grow.

First Solar is opening a new production facility in Malaysia and it expects to increase its production capacity from 6.3 gigawatts (GW) at the end of 2020 to 9.4 GW at the end of 2022. Its Asian facilities make its production cost competitive, and as the bulk of its production is carried out in Malaysia and Vietnam, the company also does not face antidumping duties currently imposed on photovoltaic cells and modules imported from China.

A hand replacing a poster of power station chimneys by one with wind mills and solar panels.

Image source: Getty Images.

A more focused approach to panel manufacturing and an exit from its project development business where it wasn't as competitive should help First Solar maintain its high margins. It expects sales to grow by 8% in 2021, and to generate gross margin of around 25% for the year.

2. First Solar has a strong balance sheet

First Solar has a rock solid balance sheet. In fact, the company's net debt is negative, meaning it has loads of cash to pay the small amount of debt that it owes. A strong balance sheet enables First Solar to not only self-fund future capacity expansions but also invest in disruptive technologies that can set the company's products apart from its competitors. 

FSLR Debt to Equity Ratio Chart

FSLR Debt to Equity Ratio data by YCharts

As an example, First Solar believes that its 'thin-film technology' generates greater energy than traditional modules. Differentiated and better quality products could help First Solar command higher margins for its products. 

As the above graph shows, First Solar easily beats its peers when it comes to balance sheet strength. This strength enabled First Solar to survive in an industry that may at times see periods of structural demand-supply imbalance.

3. First Solar's valuation has improved

First Solar stock's recent underperformance combined with its earnings growth has brought its valuation to highly attractive levels. The stock has fallen 17% this year and is trading at a price-to-earnings ratio of around 22 compared to a ratio above 80 a year ago.

FSLR PE Ratio Chart

FSLR PE Ratio data by YCharts

First Solar stock's valuation looks more in line with its peers now. That makes it a lot more attractive than it was some months back.

All told, the recent fall in revenue and potential margin pressure may not be as concerning as investors fear. The fall has brought the stock's valuation to attractive levels, and bright growth prospects for solar energy should help drive the company's performance for years to come. Overall, First Solar stock looks like an attractive buy right now despite investors' fears.