This rally has been vicious. I know there are plenty of individual investors -- not to mention professionals -- scratching their heads and blaming themselves for not buying more aggressively in early spring. The market has not given you many chances to get in.

The way I see it, however, if you buy quality businesses with good growth prospects, you will do well in the long run. Yet investors in one high-quality sector haven't enjoyed any of the rally's run-up. Utility stocks have massively underperformed the stock market. The natural question to ask is: Why?

Behind the junk rally
So far during this rally, the lower the quality of the stock, the higher its return has been. Yet in many cases, the inverse has also been true -- good stocks have done badly.

In theory, of course, it should be just the opposite. You don't have to search hard to see the junk that is flying: AIG (NYSE:AIG), Fannie Mae (NYSE:FNM), Freddie Mac (NYSE:FRE). But the fact that they are rallying does not mean you should be buying those stocks. Instead, consider utilities.

Utilities are defensive
The recession has certainly affected the utilities sector, despite the stable cash flows that utilities typically generate. As of the end of August, wholesale electricity prices in the Northeast had dropped to the lowest level in almost six years because of weak demand.

On top of the recession, the weather over the summer was relatively cool, further suppressing demand for electricity. But adverse weather conditions won't last forever, and the economy has been slowly improving. I expect utility stocks to stop underperforming now that business conditions are getting better.

I have mentioned Exelon (NYSE:EXC) favorably in previous columns because the company has a distinct competitive advantage -- it's the biggest nuclear power generator in the United States. One thing about nuclear power: The plants are very expensive to build, but the fuel is a very small component of the overall cost of production. That makes the company's cost to generate electricity very stable, which is not the case with coal-fired or natural gas-fired power plants.

Exelon gave its investors major headaches with its hostile bid for NRG Energy (NYSE:NRG), which was rejected by NRG shareholders this summer. Exelon decided to drop the bid, which marked the third time it had dropped a prospective acquisition in the past six years. Clearly, bringing acquisitions to fruition isn't Exelon's strong point, but the company's competitive advantage is certainly worthy of close consideration.

The stock trades at 12 times earnings, and with a yield of 4.2%, the company pays more income than 10-year Treasuries while giving investors dividend growth opportunities. I'm not worried about inflation at the moment, but I know a lot of people are, and dividend-paying stocks are one way to protect yourself when looking for income in a potentially inflationary environment.

Investable wind power
Environmentalists love FPL Group (NYSE:FPL), and for good reason. According to FPL Group's CEO, "[I]f every utility in the nation were as clean as FPL Group, total U.S. CO2 emissions would be cut by 20%, which is the equivalent of removing eight of every 10 vehicles from the road." This is due to FPL's commitment to renewable energies: The company claims it's the No. 1 producer of energy from both wind and solar power in the U.S. Sound interesting?

That gives FPL Group a similar competitive advantage should fossil fuels become too expensive. And if climate legislation forces other utilities to spend heavily, the company already will have done much of the necessary planning. The stock trades at around 11.5 times earnings and yields 3.5%.

Finally, I really like Dominion Resources (NYSE:D), the highest yielder of the three at 5.1%. Dominion is a conservative utility, and it is well-diversified with coal, gas, nuclear, and other methods of producing electricity. It serves the mid-Atlantic, the Northeast, and the Midwest. For years, management has taken a conservative path and has generally delivered on its promises. Even with a good yield, its payout represents only 63% of its earnings, so the generous dividend is well-covered.

There isn't much that's sexy about utility stocks. But, if you are looking for safety, reliable dividends, and peace of mind in a market environment that is highly uncertain, it could be just the right sector for you.

For more on market issues:

Fool contributor Ivan Martchev does not own shares in any of the companies in this story. Try any of our Foolish newsletters today, free for 30 days. The Fool has a disclosure policy.