The energy sector is one of the most important sectors when it comes to maintaining the functionality of everyday life around the world. It powers the globe, securing livelihoods and fueling industries to sustain the world as we know it today.

Unfortunately, this importance hasn't translated to great returns for investors; the energy sector has lagged behind the greater market. In the past decade, the S&P 500 is up over 157%, while the energy sector of the S&P 500 is only up 12%. Total returns are up over 211% and 60%, respectively, but that's still a large difference.

Despite the sector's troubles in recent times, energy companies can still play an important role in investors' stock portfolios because of their attractive dividends and the indispensable nature of their business. Here are three to consider.

1. Enbridge

Canadian energy company Enbridge (ENB -1.21%) focuses primarily on transporting and distributing crude oil and natural gas. It's one of Canada's largest and most established energy infrastructure companies, with a footprint across all of North America.

Enbridge's stock price hasn't been kind to investors recently, with it down around 15% in 2023 (as of Oct. 16), but that presents a good entry point for potential investors. Although Enbridge is already a leader in the space, the company is still positioned to expand its business to an impressive scale.

Enbridge recently announced it would acquire three U.S.-based utilities from Dominion Energy for $14 billion, making it North America's largest natural gas utility franchise. Greg Ebel, Enbridge's CEO, called the deal a "once in a generation opportunity." That has yet to be seen, but it does put Enbridge in a position to capitalize on its expanding infrastructure.

The new deal not only gives Enbridge a chance to increase its natural gas distribution capacity and serve a larger customer base by opening new markets, but it could also lead to more cost efficiencies if the company can benefit from economies of scale and better bargaining power.

Since Enbridge is a Canadian company, its dividend is expressed in Canadian dollars, but the 0.8875 exchange rate between the Canadian and US dollar translates to around $0.66 per share quarterly. The dividend should continue to get more lucrative, as the company has increased it for 28 straight years with a compound annual growth rate of 10%.

2. Devon Energy

Oklahoma-based Devon Energy (DVN 0.19%) focuses on natural gas exploration and production throughout the U.S. It's also been rough for Devon Energy's stock price this year, down over 20%, but many of the drops along the way have been plunges in relatively short periods: A 16% drop from Feb. 14 to 17, a 20% drop from March 6 to 20, and a 12% drop from Sept. 28 to Oct. 5, just as examples.

The volatile nature of Devon Energy's stock follows the volatile nature of its business and dividend. Devon Energy has a unique dividend structure. It has a base amount (currently $0.20 per share) and a variable amount that depends on the company's cash flow.

If you've been to the gas pump lately, you'll notice prices have shot back up. That's largely because OPEC+ has intentionally reduced its oil output to keep prices at their preferred levels. Rising oil prices translate into more cash flow for Devon Energy, which translates into higher dividends for investors.

The West Texas Intermediate (WTI) crude oil price currently sits around $85. Devon Energy predicts that it can provide a 5.3% dividend yield with WTI prices at $80, so that should be an encouraging sign for investors who've seen their dividend reduced with lower oil prices this year.

Investors should be prepared to stomach the volatility that comes with Devon Energy, but the company has been increasing its scale recently to better position itself for future growth.

3. Energy Transfer

Unlike the other two companies on this list, Energy Transfer (ET 0.12%)has been a pleasant surprise for investors, up close to 20% in 2023. Energy Transfer is a pipeline company focusing on midstream operations like transportation, storage, and exporting, and its corporate structure makes it ideal for investors looking for income.

Energy Transfer is a master limited partnership, so it has distributions that are set by the company's management instead of dividends. Management recently announced an increase to Energy Transfer's quarterly distribution, bringing it to $0.31 per unit. Current prices give the company a yield of just under 9%.

In its September 2023 investor presentation, Energy Transfer reported that of its $7.5 billion in distributable cash flow, it planned to distribute around $4 billion to investors (around 54%), with plans to increase it around 3% to 5% annually. That can make an already lucrative dividend hard to pass up.

Another $2 billion to $3 billion of the distributable cash flow it plans to use for continued growth by improving efficiencies, optimizing storage facilities, expanding pipelines, and other smaller projects. After a slowdown in capital spending on growth, Energy Transfer seems ready to ramp back up.

As Energy Transfer shifts focus back on growth, it should see increased cash flow down the line that secures its ultra-high dividend for the foreseeable future.