Pipeline stocks have been under pressure this year from all the turmoil in the energy market. For example, shares of Canadian oil pipeline behemoth Enbridge (ENB 1.68%) have shed nearly 20% of its value while U.S. gas pipeline giant Williams Companies (WMB 0.51%) is down about 10% on the year. Those sell-offs come even though both companies have delivered results within their initial expectations. Now investors can buy them for cheaper values, locking in higher dividend yields in the process.

With both seemingly selling for bargain prices these days, here's a look at which is the better buy right now.

A burst of sunlight shining on a pipeline.

Image source: Getty Images.

The case for and against buying Enbridge

Enbridge generates very stable cash flow backed by long-term contracts and regulated rates. That durability has been evident this year. The company remains on track to achieve the mid-point of its initial CA$4.50-CA$4.80 per share ($3.47-$3.70) guidance range for distributable cash flow. That puts its valuation at around nine times cash flow, given that it recently traded around $32 a share. It also sports an attractive 7.7% dividend yield.

Meanwhile, the company expects its cash flow and dividend to grow over the next few years. Enbridge has the financial flexibility to invest between CA$5 billion and CA$6 billion ($3.9 billion to $4.6 billion) per year into expanding its asset base thanks to its conservative dividend payout ratio and balance sheet. That should support mid-single-digit annual growth in cash flow per share. It already has an extensive backlog of projects lined up, including new oil and gas pipelines, gas utility expansions, and offshore wind farms in Europe.

If there's one concern with Enbridge, it's the company's reliance on fossil fuels. Roughly half of its cash flow comes from liquids pipelines. The problem is that oil demand might have already reached its peak, with the potential that consumption could decline sharply in the coming years as the global economy accelerates its shift toward renewable energy. On a more positive note, Enbridge has been working to clean up its portfolio in recent years by shifting its focus toward cleaner natural gas and offshore windfarms. On top of that, it's making investments in renewable natural gas and hydrogen. That has it in a solid position for the energy transition.

The case for and against buying Williams Companies

Because Williams also generates stable cash flow backed by regulated rates and long-term contracts, it's still on track to achieve its distributable cash flow guidance range of $2.50 to $2.83 per share. With the stock recently selling for around $21.50 a share, it trades at about eight times cash flow and a dividend yield of 7.5%.

Meanwhile, the company's earnings and dividend should also continue heading higher in the coming years. Williams expects natural gas production to increase in its focus areas, fueled by rising demand from liquefied natural gas exports. The company has the financial flexibility to fund expansion projects to capture this growth thanks to its solid balance sheet and healthy dividend coverage level.

The main concern with Williams is also the rapid adoption of renewable energy. On the one hand, the company has started taking steps to address this issue by launching a solar power initiative to install panels at some of its facilities and offset a portion of its power usage and carbon emissions. However, it hasn't gone as far as Enbridge, which is actively developing cash-flowing renewable power projects that supply emissions-free energy to the grid. It could fall behind if the global economy accelerates its shift toward renewable energy, especially if emerging technologies like green hydrogen become a viable replacement for natural gas.

A close race

Enbridge and Williams Companies both trade at relatively cheap valuations and high dividend yield, making them seem like compelling buys for income-seeking investors. However, Enbridge looks like the better long-term option, given that it has already started to pivot toward renewables. That makes it less likely to get disrupted if the global economy accelerates its adoption of renewable energy.