Last year was another lackluster one for investors in the energy patch. The average energy stock in the S&P 500 rose only about 5% on the year, which vastly trailed the overall index's 28.9% surge. The energy sector's underperformance came even though the price of oil rebounded about 35% on the year. 

That's left several of the sector's top companies trading at relatively attractive valuations, making them great buys right now. Leading the way are midstream giant Energy Transfer (NYSE:ET), top-tier upstream oil and gas producer EOG Resources (NYSE:EOG), and leading refiner Marathon Petroleum (NYSE:MPC).

The sun setting behind an oil pump.

Image source: Getty Images.

Fast growth for a low price

Energy Transfer is one of the largest master limited partnerships in the energy sector. While big companies usually don't grow very quickly, that's not the case with Energy Transfer, as it was on track to expand its earnings by 16% last year. That trend should continue again this year.

Because investors highly value growth, companies with strong growth rates tend to trade at premium valuations. However, for whatever reason, investors aren't giving Energy Transfer any credit for its above-average growth profile. Instead, they value the company at less than 9 times its earnings, which is well below its peer-group average of around 11. This low valuation, which has only gotten cheaper in the past year, is a big reason Energy Transfer currently yields an eye-popping 9%.

That yield, when combined with Energy Transfer's low valuation and growth prospects, gives it the potential to generate significant total returns when investors finally come to their senses.

Focused on producing outsized returns

EOG Resources' performance over the past year has been a real head-scratcher. Shares of the oil producer have tumbled about 16% even though crude prices have rebounded sharply.

The reason that underperformance doesn't make sense is that EOG Resources can thrive at $50 oil. At that price point, the company can produce enough cash to grow its oil output by more than 10%, as well as fund its dividend with room to spare. That's why it's producing a gusher of excess cash now that crude prices are around $60 a barrel.

EOG Resources believes its strategy of drilling low-cost, high-return oil wells that grow both its production and excess cash should make it a winner over the long term.

Refining its strategy to produce higher returns

Marathon Petroleum also delivered an underwhelming performance last year, as shares slumped 14%. That's leading an activist investor to press the company to make some changes to unlock shareholder value. It's already working on some of them, which includes plans to spin off its Speedway gas station business as a separate publicly traded company later this year. Meanwhile, it's also evaluating options for MPLX, its MLP, which could include spinning off the units it owns to create an independent company.

Those moves to refocus its strategy on its core refining business should enable Marathon to take even greater advantage of new fuel standards in the shipping sector. That catalyst, when combined with other actions it's taking to increase its refining margin, should help bolster that business. Add that to the potential value-unlocking moves from spinning off affiliated entities, and analysts expect Marathon's stock to be a big winner this year.

Waiting for the negativity to fade

Energy stocks continued to disappoint investors last year, even though oil prices rebounded. That's due in large part to investor sentiment that remains negative despite improving industry fundamentals. Although it will likely take quite some time for investors to change their minds, when they do, this trio could produce significant gains, given their underperformance last year despite all they have going for them. That makes them among the most compelling energy stocks to buy right now.