Solar power is expected to be the fastest-growing energy source worldwide in the coming years. The share of global electricity generation from solar is expected to rise from its current 3% to more than 20% by 2050. That's surely good news for companies in that segment of the energy industry, including solar panel manufacturers. However, it doesn't guarantee rosy days for leading U.S. solar panel supplier First Solar (FSLR 0.43%). On the contrary, the company faces some serious challenges.

Competition is fierce

First Solar's quarterly revenues grew at an average annualized rate of around 13% over the past 10 years. That looks impressive, but it pales in comparison to JinkoSolar's (JKS -0.46%) average growth of around 35% over the same period. Nor was it as good as Canadian Solar's (CSIQ -0.83%) 17% average revenue growth.

CSIQ Revenue (Quarterly) Chart

CSIQ Revenue (Quarterly) data by YCharts

On a positive note, First Solar generated higher average gross margins than those rivals. First Solar can possibly beat its low-cost competition by selling better products that generate higher margins.

CSIQ Gross Profit Margin (Quarterly) Chart

CSIQ Gross Profit Margin (Quarterly) data by YCharts

However, things look different when you examine its recent margin numbers. First Solar's average gross margins over the last three years were 17.6% compared to its 10-year average of 22.4%. That decline reflects the level of margin pressure that First Solar has faced, and will continue to.

CSIQ Gross Profit Margin (Quarterly) Chart

CSIQ Gross Profit Margin (Quarterly) data by YCharts

The rise in First Solar's gross margin in the latest quarter (as shown in the graph above) was due partly to certain project sales in Japan and India. But those types of earnings fluctuate a lot, and they aren't recurring. Moreover, the company is exploring options for its U.S. project development business -- including the possibility of selling it.

A more focused approach

That decision by First Solar management to explore its options was based on its cost-return analysis of a competitive segment -- part of a series of steps that it has been taking to turn itself into a more focused solar panel manufacturer. First Solar exited from its engineering, procurement, and construction business (EPC) business in 2019. The company now uses third-party EPC services. And in August, it agreed to sell its operations and maintenance business to NovaSource. The idea is to focus only on the highest-margin aspects of its business. While this may limit growth avenues for the company, it's the right approach to improve returns.

Solar Panels on a Bright Sunny Day.

Image source: Getty Images.

Meanwhile, First Solar hopes to expand its module production capacity to around 8 GW (gigawatts) annually by the end of 2021. That would be an addition of around 2.5 GW from its expected 2020 shipments of 5.5 GW to 5.7 GW.

A rough outlook for margins

A favorable policy environment for renewable energy companies in the years ahead should benefit solar companies. And First Solar continues to take steps to become more cost-competitive. It opened production facilities in Vietnam and Malaysia and is exiting low-margin businesses. If management can continue to keep a lid on costs, the potential market for its solar panels is vast. However, margin pressure remains intense in this extremely competitive market, which will limit the potential for bottom-line growth.

CSIQ PE Ratio Chart

CSIQ PE Ratio data by YCharts

First Solar is trading at a P/E ratio of more than 50. That's not only much higher than the market's average, it's also higher than its peers. Solar stocks' higher earnings growth potential likely accounts for them trading at higher P/E ratios than the average for the broader market.

Notably, First Solar has historically traded at a premium compared to its non-U.S. peers. However, the stock has been underperforming those peers, likely reflecting that it has displayed less ability to grow earnings than investors had expected.

Solar energy's growth potential will provide a nice tailwind to solar stocks. But while First Solar, too, is poised to grow, I'm of the view that the stock may continue to underperform its peers. I find Canadian Solar a better buy now, based on its valuation and growth prospects.