Years of playing Civilization 3 has taught me one thing: If something like that ever happens, you retaliate with the same, if not greater, force that they used to attack you.
I would nuke their capitol, no buts about it. Say the terrorist was from Iran (which would be entirely likely). Well, they released a nuke in NYC. Why not release a nuke in all of their collective cities? The damage would still not be done, because Manhattan is far greater than all of the cities in Iran.
The solution? Carpet-nuke the entire nation of Iran. This is, of course, if the nuke is a real nuke, and not a dirty bomb. If it's a dirty bomb, just attack Iran full-force with conventional methods, and purge their government

.
If it's any other Mid-Eastern nation, however, just attack them and destroy their government. Chances are, the populace rarely agrees on anything their government does (this was evident in Iraq and Afghanistan).