Nukes can be useful for a diplomatic victory, paradoxicaly. Votes are based on population. So if you quickly reduce the population of your opponents, your votes and your allies votes gain relative weight.
Depending on the situation you should avoid bombing your competitor in the UN, because another will take its place. Bomb your competitor's allies. Sure they get angry but they would never have voted for you anyway.
And sometimes it helps getting peace. In a game today, I nuked Roma and Cumae and the romans asked for peace. I did not want to get involved in a real war so I accepted.