Today in the markets, a great deal of fear and uncertainty is rampant, largely due to Israeli statements to the effect of "We will attack Iran" (meaning bomb their fuel site at Natanz). These came from former Israeli intelligence officials, and not fringe hawks. The fear Israel has is that Iran will acquire a nuclear weapon, and then carry out the threats issued by Ahmedinejad.
But why does Iran want a nuclear weapon? Is it to carry out the threats issued by the Imam Ruhollah Khomeini, or is it a strategic issue? There are competing interests in Iranian religious (ideological) and political arenas, but both seem to desire the acquisition of nuclear weapons. It seems to me that at the ideological level Iran is a fanatical regime seeking the destruction of a hated minority in the Middle East (the Jews). But at a political level Iran seeks nuclear weapons for security reasons.
After the invasion of Iraq in 2003, the Iranians looked long and hard at US statements and actions. The US declared that there was an "axis of evil" and that these states cannot be allowed to have weapons of mass destruction. The problem is, one did, North Korea. Iraq did not. Iraq was attacked and North Korea was not, and the only difference was that there was a demonstrated nuclear weapons program in North Korea. (This is not the only difference but for the point of this piece it may well be). The Iranians noted that a nuclear weapon can be a deterrent to US military action. Now Iran sees this weapon as a "must have" to deter action by both Israel and the US. The Iranian Shahab 3 missile can reach all of Israel, and if equipped with a nuclear warhead would functionally change the balance of power in the Middle East.
Once Iran has a nuclear weapon that could deter a full scale US assault (Iran has said it will treat a US or an Israeli attack as precisely the same thing), it can then proceed to squeeze the United States in the Strait of Hormuz. Iran strategically controls this strait, and could harass shipping lanes with artillery fire, missiles, rockets, along with the IRGC naval boats. For the Iranians they can bring physical harm to Israel with a nuclear weapon, and economic harm to the rest of the world by essentially closing the Strait of Hormuz. If this took place there would be a classic naval battle that would easily escalate into something much more, once US air power struck Iranian land assets.
The US is in a very difficult situation. It can allow Israel to pre-emptively defend itself (which seems to me a right, since waiting could mean the total annihilation of Israel), this will be treated as an aggression by both the US and Israel, and the response will not discriminate. Also if the Iranians acquire a nuclear weapon and subsequently close the Strait of Hormuz, the US will view this as a restriction of international shipping and a causus belli. The situation is made more serious by Israel's absolute determination to remain in existence, and by the eschatological rhetoric of Mahmoud Ahmedinejad. At the UN Ahmedinejad made a speech to the General Assembly, after which he made an untranslated supplication for the coming of the Mahdi (the return of the 12th Imam from occultation, which will herald a coming of Islamic dominance and the end of the world).
Keeping these things in mind, we may well see a deadly confrontation in the Middle East by January of 2009 (Israel has made noises that it will not wait for the new administration to take office). If Iran acquires nuclear weapons, there will be a three way confrontation between nuclear powers at the center of world oil production and religious conflict. Iran will launch a multi-faceted response incorporating Hezbollah and Shi'a (secret) assets around the globe, which gives the situation the potential to spread rapidly.
There may be no good solution.