My best shot:
The end of the Iran-Iraq war in 1988 ends as little more than a stalemate, despite the awesome cost in money and lives to Iran, which found itself almost bankrupt and with over a million people killed in the war. Despite the fact that Iran was never really defeated in the war, the image among many Iranians is that while defeating Saddam had been plenty justified, many of the losses were unnecessary, and this erodes the popularity of the Islamists starting as the war ends. The process speeds up after Khomeini's death in June 1989.
Khomeini's successor, Akbar Hashemi Rafsanjani, changes the course of this. Sensing an opportunity, he calls for Iran to be a support of Arab rights and a "unifier of Islam". This initially concerns American allies, but it becomes clear early on that Iran's actions are not hostile to Americans or American interests - in fact, Iran's open support of Muslims in the Soviet Union makes them rather more respected.
After the Gulf War, Iran begins talking with the United States more, including offering to help wherever possible with regards to Israel and the Palestinians. This is a risky move on Rafsanjani's part, but it gets him respect. The Arabs at first incensed by this action, but Iran offers to provide what support it can to the Palestinians on the condition that they work out their differences with Israel without violence. The signing of peace accords between Israel and the Palestinians in 1993 sees Iran challenged to make good on its promises - which it does. The latter years of Rafsanjani's era focus turns towards making better relations with the west, which also begins the liberalizing trend Iran experienced in the years later. Recognizing how hated Iraq was in the world, Iran began crafting an image of being the defender of Islam's spirit, and seeking to integrate it with the modern world.
Mohammed Khatami, who comes to power in 1997, takes this several steps further. Khatami allows many of the more hardline Islamist rules to be relaxed, while also encouraging freedom of expression and better diplomatic relations as well as improved economic performance. Khatami dusts some of the ideas of the Shah off, while being careful to point out that Islam is still the base of Iran, but also pointing out that Islam and a modern society with free rights can and should mix. Khatami's work is substantially successful, as diplomatic relations are re-established with the United States in 1998.
September 11, however, stuns Iran just as it does most of the rest of the world. Iran is one of the first Muslim governments to comment on it, calling it a "crime against humanity" and that "no people, even those who are truly evil, deserve to be victims of such a crime." That response does not go un-noticed in Washington, and President Gore invites Khatami to the United States in November 2001, with Khatami making a point of praying for the victims of the attacks at Ground Zero. This makes a quite visible difference in the views of both Americans and Iranians.
In March 2002, Iran offers to send troops to assist the ISAF force in Afghanistan. The United States accepts, and over 40,000 Iranian troops are deployed to Afghanistan, with Iranian commanders. The Iranian army does well, and Iran's decision in June 2002 to allow supplies to travel to Afghanistan via Iran helps the US immensely with logistical difficulties. This leads to a formal thank you from the United States to Iran for its help in Afghanistan in February 2003. This is followed by additional American investments in Iran and a deal to begin importing more oil from them rather than the Saudis. This improves Iran's economy quite substantially in 2003 and 2004, which leads to Khatami's successor, Mir-Hossein Mousavi, easily winning the presidency in 2005.
In 2007, Gore invites Mousavi to Washington, who gladly accepts the offer. The Iranian people in 2007, on the eve of the visit, are showed to have over 40% having a favorable view of the United States, far beyond any Arab nation. Continued economic growth and good relations see Iran's economy begin a long, steady rise in living standards in 2007.
By 2010, there is no formal alliance between them, but the United States views Iran as a friendly presence in the region, despite the near-constant to and from between Iran's reformers and its powerful Shi'a clergy. The country's economy has grown nearly 80% between 2000 and 2010, with the biggest growth in the high oil prices from 2007. Trade between the countries runs over $40 Billion in 2010, and tens of thousands of people go between the two nations each year.