Immigration is to 2014 as Obamacare was to 2010, whether it passes or fails.
After a year of debate, Obamacare was signed into law in March 2010. The resulting outrage swept the Democrats from power in the House and nearly the Senate in the November 2010 midterm elections. Immigration reform may have the same effect on next year's election, in one of two directions. It will pass the Senate, but its fate in the House is the real question. If it gets full Democrat support and a few Republicans, it will pass the House. It then becomes a GOP target for rallying the base to the midterm election (along with the IRS, NSA, EPA, and other scandals), possibly helping Republicans take back the Senate.
However, if it fails it will have the opposite effect, this time for Democrats. If the GOP stands united against it, and it doesn't pass the House, President Obama gets to rally his base against the "hateful, bigoted, xenophobic, backwards" Republicans. There's not much of a chance of Democrats taking back the House in 2014, but an energized Democrat base could at least hold their Senate majority.
So that's the game. Some even suggest the bill is designed to fail for these electoral reasons. I call myself cynical, but even I'm not that cynical. I think immigration reform is the right thing to do, for many, many reasons, though I don't think the bill is perfect (is any?). But we'll never get a perfect bill, and until then millions of people from other countries who just want a better life for themselves and their children are pushed to undermine our legal system. So screw the politics, let's fix the system.