Religious states always have a degree of instability in them because their fundamentalism drives them to commit actions in the name of their religion or god. While often this is just typical bias for those of their religion, with Islam it's a whole different ball game because the religion is inherently intolerant, expansionist by the point of the sword, and aggressive.
And, yes, I am aware that states driven by other motivations, such as communism or nationalism, can be just as irrational, too. We saw that with Nazi Germany's flavour of government.
But I have zero doubts that if an Islamist had control of a nuclear weapon, he or she would deploy it against those who stand against their religion in their eyes, even if they die in the attempt and regardless of other consequences.
Even a communist would consider the ramifications like any other sane person and go "yeah, maybe firing a nuke at Washington, London, or Tel-Aviv is a bad idea because we'd end up all dead in the aftermath".
An Islamist would be all for it for killing "infidels" and going to "heaven" alongside their friends and family.
Also, Iraq under Saddam wasn't a Muslim state: Yes, it was the official religion, but basically it was a socialist state one short step from outright communism at the top. What they did wasn't in the name of Allah or Islam but nationalism, racism, and political, not religious, ideology.