2012 was a tough year for utilities. A macroeconomic mess and fiscal cliff fears left this industry lagging the S&P 500 by more than 12 percentage points. But 2013 could be a comeback year, reversing 2012's slump and pulling in profits for your portfolio. Here are three reasons why.

1. The grid
Electricity infrastructure is in a sorry state. While other industries have embraced and adopted technological innovation, the time, cost, and regulatory burden of utilities upgrades have left this sector in the dark.

Smart grid technology offers a solution to many of the most annoying and expensive problems that utilities experience by localizing electricity generation and constantly adapting supply to meet demand. Early adopters of smart grid technology include Exelon (EXC 2.37%) and PPL (PPL 1.50%).

Exelon's three regulated utilities have invested more than $14 billion over the last 10 years, with much of this going toward smart grid initiatives. They are installing nearly 8 million smart meters, upgrading substations, and implementing a variety of innovative pricing models. To help offset improvement costs, Exelon has secured at least $400 million in grants from the Department of Energy.

PPL received a three-year, $40 million federal stimulus grant to run a pilot project in Pennsylvania. The project has been running for six months, and is already providing cheaper, greener, and more consistent energy to 60,000 customers. Over the next five years, PPL expects to invest $3.5 billion to bring its systems into the 21st century.

2. Clean energy
Over the past few decades, our dependence on foreign oil has caused a plethora of geopolitical nightmares, costing Americans (and foreigners) thousands of lives and billions of dollars.

To put an end to this trend, President Obama outlined a new Blueprint for a Secure Energy Future in 2011. While there's plenty of cannon fodder for energy companies, the game is changing for utilities, as well.

The blueprint paves the way for cleaner, smarter electricity production over the next 25 years. More specifically, the hope is to double America's share of clean electricity from 40% to 80% by 2035.

As energy choices continue to expand, utilities' energy portfolios will make or break their profitability. There's no secret recipe, and different corporations are trying on a variety of fixes. NextEra Energy (NEE 0.45%) is the nation's largest producer of renewable energy with heavy reliance on wind.

Thanks to the renewal of wind's production tax credit, this energy's cost effectiveness continues to put it on level playing ground with other sources. Even as NextEra's sales have fallen 6.5% over the past five years, the utility has managed to increase net income by 17%.

General Electric (GE -3.19%) provides a unique entry point to clean energy, regardless of who's buying. The company partnered with PPL on its smart grid project, sells its WindBOOST technology to NextEra, and its Ecomagination division created 140 products and pulled in $100 billion in sales in 2012.

3. Dividend dynamite
Leading up to the fiscal cliff, investors fled from dividend stocks amid fears of a massive dividend tax hike. But when Congress compromised, they barely nudged the tax scenario for utilities, clearing the path for reinvestment.

Utilities like Atlantic Power (AT) offer dynamite dividends, but investors should know that some yields might be little more than bullish bait for a careless investor. While Atlantic's 9.4% yield is enough to make any dividend investor salivate, the utility might need to rethink its capital allocation in the coming years. Alternatively, National Grid's 4.1% yield is much lower, but its positive cash flow and reasonable payout ratio might be a better match for your portfolio's long-term prospects.

Ready, set, grow!
2012's slump provides a unique buying opportunity for the utilities sector, but investors need to be more aware than ever that there will be winners and losers in this industry. The same reasons that utilities are heading for new heights are the same reasons some will stumble. I've made outperform calls on NextEra, General Electric, and Exelon on my Motley Fool Caps page, and am looking forward to seeing where this sector heads in 2013.