Yes, Sandy swung NJ and NY voters to Obama, since both states went against the national trend
2012 Obama winning margin vs 2008:
Nationally decreased 3.43%
NY increased 1.28%
NJ increased 2.15%
Both areas did swing to Obama, and Sandy might have had some impact, but not as much as you might think.
The swing was stronger in the core areas near NYC in Jersey than along the shore.
In NY, while 4 of the 5 boroughs did swing to Obama (Manhattan being the only one that didn't), the strongest swings to Obama were in northern and portions of western NY. Almost everything from Monroe County (Rochester), east to Albany and north to the Canadian border (with a few exceptions just north of Albany) swung Obama.