Under international law, Israel has a right to attack in self-defence, and considering the President of Iran calls or predicts their destruction on a near weekly basis, they have very good grounds for insisting Iran not be allowed to develop nuclear weapons.
Israel is a tiny tiny country. A few nukes and the whole country is pretty much gone. Wars for them are about survival.
Despite that, it would be regrettable for Israel itself to use nuclear weapons to destroy Iran’s nuclear weapon capability. There’s a nasty symbolism there, and even tactical nukes would be unacceptable. If the UN and others can’t stop Iran developing nuclear weapons, then I’m fine with Israel taking them out, as they did with Saddam in 1981. But it needs to be by conventional, not nuclear weapons.