What happened

While markets are sliding a bit today, renewable energy stocks are moving in the opposite direction. Shares of fuel cell-focused companies Plug Power (PLUG -5.17%) and Bloom Energy (BE -1.23%) are both rising, as is solar power installer Sunrun (RUN 1.39%). The gains are in response to news that a stalled climate bill received support making it more likely that the legislation will make it to President Biden's desk.

As of 12:41 p.m. ET, shares of Plug Power and Bloom Energy are up 3.2% and 2.8%, respectively, while Sunrun's stock has risen 4.3%.

So what

The passage of the Inflation Reduction Act, a package of climate and healthcare measures, seemed unlikely just a couple of weeks ago, largely due to the lack of support from Democratic U.S. Sens. Joe Manchin of West Virginia and Kyrsten Sinema of Arizona. With no support from Republicans, the legislation requires the backing of all 50 Senate Democrats in order to pass.

Last week, however, Manchin did an about-face and voiced support for the bill. It still lacked the support of Sinema, who sought funding for Arizona flooding relief and the retention of the carried interest tax loophole. Following changes made to the legislation to address her concerns, Sinema articulated support late Thursday for the bill, which now stands a much better chance of passing.

Included among the many components of the legislation is $369 million in funding for addressing energy security and climate change. Plug Power and Bloom Energy stand to benefit significantly from the bill, which provides a hydrogen production tax credit. In addition, the bill addresses $9.7 billion in funding to increase resiliency of electrical systems in rural areas. Plug Power and Bloom Energy both supply fuel cells for microgrid applications -- small, self-contained electric systems that provide backup power when the grid is down.

Regarding solar power, Sunrun can benefit from several provisions in the Inflation Reduction Act, including an extension of a residential solar tax credit through 2032. Sunrun is a leader in residential solar installations in the U.S. Earlier this week, Sunrun reported that its customer count has risen to 724,000 -- 21% year-over-year growth -- in 22 states as well as Washington, D.C., and Puerto Rico.

Now what

It's little wonder that renewable energy investors are celebrating Sinema's approval of the climate legislation, but it's important to recognize that a cautious approach is still warranted. For one, passage of the legislation is not a guarantee. It's Washington, after all, and it wouldn't be surprising if some last-minute maneuvering jeopardizes -- or kills -- the likelihood that President Biden has the opportunity to sign it into law.

In addition, Plug Power, Bloom Energy, and Sunrun all have a history of generating net losses. It's unlikely that this legislation will remedy that fact; therefore, prospective investors must recognize the associated risks with picking up shares of any of these stocks.