Jewish law (and common sense morality) allows one to act in self-defense. It allows preemptive measures to be taken in the case of an imminent danger. It does not allow a person, or people, to attack others because they feel threatened – especially when that feeling is born of neuroses and prejudice.
Iran is an enemy of the State of Israel, but it is not an existential threat to Israel, nor has it threatened Israel with nuclear destruction. But even it had, that would not be a legal or moral justification for an act of aggression against Iran – unless the possibility of an Iranian attack was imminent, and other non-violent diplomatic options had run its course. By diplomatic options, I do not mean sanctions, I mean negotiations, including multilateral negotiations that include Israel and Iranian pledges not to build nuclear weapons or to eliminate current stockpiles.
Hence, an attack against Iran either by the US or Israel or those in the West is utterly unjustified from a legal or a moral standpoint. It would constitute naked aggression and Iran would be perfectly justified to retaliate in self-defense.
I am aware that Iran is a violator of certain international agreements, and I am certainly aware that the Iranian regime is a horrible one. Sanctions can, and should be, used against human rights violators, even if those violators are addressing their own citizens (and that is a tricky issue.) But those sanctions cannot be crippling, especially in a situation such as the present, where one country is doing what many other countries have in the past – develop nuclear energy, and even a nuclear weapon capability. Why should there be one law for North Korea and Pakistan, and another for Iran? Why should Israel reserve the right to prevent any Arab country from going nuclear, or from joining a nuclear-free zone?
The Jews I know seem to be divided between those who support sanctions and those who support military action. Maybe I hang out with the wrong crowd. I support neither. The drums of war have started again, and the madness should be stopped now. If either Israel (or its proxy, the US) attacks Iran, it will be difficult for any moral person to defend the right of such a rogue state to exist.