Coal is under fire, and not in a good way. Investors are likely well-accustomed to the headwinds facing coal, which include increasing regulatory scrutiny and cheap natural gas prices. Indeed, many of the nation's biggest coal producers have been brought to their knees in the past few years.

The downfall of coal has hit most companies involved in the production, transportation, and end usage of coal, including those in the railroad and utility industries. At the same time, while coal's situation is dire, there may be hidden signs for optimism that you should keep in mind.

Coal's effect on railroads
Moving on without coal seems like a tough proposition, but it's exactly what many of the major railroads intend to do. In fact, railroad operator CSX (CSX 0.15%) had an overall strong third quarter despite coal serving as a significant drag on results. The company managed a 4.5% increase in earnings per share, year over year, along with strong revenue based on volume growth and favorable pricing. 

For better or worse, the company plans to move ahead, whether or not coal contributes positively to results. Coal makes up just 18% of the company's volume, with intermodal and merchandise segments representing 40% and 42% of CSX's business, respectively.

In all, coal revenue decreased 9% in the quarter, due to the global oversupply resulting in high stockpiles of coal. Moreover, CSX specifically mentioned in its earnings presentation that utility customers are switching to other sources of power. This is what leads CSX to believe domestic coal will have an unfavorable outlook for the remainder of the year.

Will utilities follow suit?
Coal investors are obviously concerned that the next domino to fall will be utilities. Indeed, there's enough to give credence to these fears. Depressed natural gas prices have served as a great incentive for utility customers to switch to coal, not to mention the more desirable environmental impacts, and lower level of public scrutiny.

This is what caused utility Southern Company (SO 0.03%) to undergo a major overhaul of its business in the last five years. As recently as 2007, Southern got 70% of its electricity from coal-fired power plants. Last year, that figure clocked in at 35%.

Fast-forward to today, and natural gas enthusiasts may need to temper their expectations. Natural gas has come off its multi-year lows, and utility customers are slowly coming back to coal. In particular, Illinois basin coal is cheap (approximately 20% cheaper than Appalachian coal) and is now serving to undercut natural gas for many utility customers, including Southern.

In a move that may surprise you, Southern is beginning to return to coal. Southern recently stated that the share of Illinois Basin coal it burns could increase by five-fold in the years ahead, after last year amounting to just 7% of the utility's coal usage.

The success of Illinois coal could be a direct benefit to coal producer Peabody Energy (BTU), and the good news couldn't come at a better time. Peabody has gotten absolutely crushed this year, and its business has deteriorated. Peabody's second-quarter earnings report wasn't positive.

Revenue and earnings before interest, taxes, depreciation, and amortization (EBITDA) fell 13% and 44%, respectively, versus the same quarter last year. Furthermore, the company does not project good things for the remainder of the year. At the midpoint of its full-year guidance, Peabody expects a net loss.

But there may be light at the end of Peabody's tunnel in the form of favorable Illinois coal. Peabody's output at its Illinois basin rose 11% last year, one of the company's only bright spots among its base of operations. Moreover, Peabody is the number-one producer of Midwestern coal, shipping about 30 million tons of coal from its Illinois and Indiana mines, collectively.

Foolish final words
In the end, coal and natural gas are cyclical commodities, meaning how much of each is utilized depends largely on pricing. Extremely low natural-gas prices greatly incentivized end users to switch from coal to natural gas, but that environment may finally be reversing. And, if so, coal producers like Peabody may have some energy left after all.