During the Bush administration, the US agreed to look the other way at India's development of nuclear weapons, despite the significant risk of a war between India and a nuclear-armed Pakistan. India developed nuclear weapons years ago to defend itself against China, which already had them. Then Pakistan developed nuclear weapons to defend itself against India. While all that may make sense from a strategic perspective, it was terrible from a nonproliferation perspective. We have basically said it is okay for India and Pakistan to have nuclear weapons to defend themselves against their enemies, or to have "mutual assured destruction," but we say that it is not okay for Iran to develop those same weapons to defend itself against its sworn enemy Israel, which already possesses nuclear weapons.
In its original form, the Non-Proliferation Treaty granted special status to countries that possessed nuclear weapons when the treaty was negotiated, but many of the non-nuclear states objected to this dual status. The NPT obligated the nuclear powers to disarm, but that has been a slow, almost non-existent process. I recent years there has been a wider acceptance of the NPT by some countries, Brazil and Argentina for example, but not by others, Israel and Iran in particular. Israel is in the position of forcing Iran to follow the NPT, which it adheres to, while Israel refuses to join it or follow it. Israel insists that Iran obey an international treaty that Israel refuses to obey.
Israel and India stand in somewhat similar positions, neither adhering to the NPT.. However, thanks to the US under Bush, India has been given a somewhat official pass, while everyone just agrees to look the other way regarding Israel's nuclear weapons. The bottom line is that the NPT, which was under attack from its very inception for having a double standard, now has a variety of standards.
As a result, although the NPT's verification mechanism, the International Atomic Energy Agency, monitors Iran's nuclear activities to some extent, since Iran is an NPT member, the IAEA is barred from Israel. Because of the breakdown of the NPT's mechanism, Israel and the US cannot rely on it. Thus, Iran's nuclear activities are removed the the UN's oversight and become the subject of bilateral threats to invade from Israel and the US. The UN continues to try to work with Iran, but thanks to all the loosening of the NPT regime, the UN has little legal or moral authority. By its past refusal to strictly enforce the NPT, the US has lost significant moral authority to restrict Iran's nuclear program. Having lost its moral authority, it must fall back on its threats of military force.