well, I believe from a technological POV, a lot of countries would be able to develop nuclear weapons, but most have decided not to do so. Those who possess nukes or strive to do so are either:
1.) under the impression that they are surrounded by adversary and need the nukes for protection ( Israel, North Korea, Pakistan, India, Iran ).
2.) former or actual superpowers who have nukes left from the cold war or who keep the nukes to support their claim to be a superpower after all ( russia, china, France, UK, USA )
I think we all agree that the world would be better off without nukes, but the technology is out there and can't be un-invented, if you will. Nukes are here to stay, and we need to deal with them. That's why we have a couple of non-proliferation treaties and the IAEO to watch over nuclear acticvity.
On the other hand, from a legal POV, Iran ( for example ) is no different from the US. Both are sovereign nations and members of the UN. And as long as Iran doesn't start a war or attacks other UN members, there is no legal grounds to throw out Iran's claims for developing nuclear weapons. If other nations do have them for protection, why shouldn't Iran ?
The question is, what makes a stable neation ? And who decides what a stable nation is ? The UN ? The "West" ? The US ?