It was all part of the US "tilt" to support Saddam during the Iran-Iraq war of 1980-1988. Iran had managed to repel the Iraqi invasion and Iran had decided to continue into Iraq and try to topple Saddam whom they viewed as a continuing threat. Reagan adopted a policy of doing whatever was necessary to prevent that. http://www.informationclearinghouse.info/article1413.htm If you look at a map you'd see that Iraq has a very short coastline along the Persian Gulf, and Iran had managed to essentially stop his export of oil that way (esp once it captured Faw peninnsula, which iran later lost after suffering massive chemical weapons casualties so other Arab states of the Persian Gulf had been helping Saddam, though Khomeini warned them that Saddam would turn on them too.
Iran had been demanding to stop and search vessels that crossed Iranian waters of the Persian Gulf and attaching tankers which were shipping Iraqi oil, thus acting as co-belligerents. Kuwait requested the aid of the Russians knowing that the US would step in instead. The US reflagged the Kuwaiti tankers to get them through the Strait of Hormuz and started to aggressively provoke the Iranians and ended up attacking and sinking several Iranian navy vessels including ones that had been laying mines in order to block the shipments for Iraq. Years later the International Court of Justice would rule in favor of Iran against the US over this, and Kuwait would end up getting invaded by the same Saddam that it had helped, and the US would up invading Iraq too to topple the same Saddam it had been arming with chenical weapons and intelligence to use the weapons.
The Vincennes itself had crossed over into Iranian waters and started shooting at lightly armed patrol vessels when it picked up the Airbus, wrongly thought it was an attacking f-14, and shot it down -- while the Airbus was still taking off and while it was still inside Iranian airspace. The US claimed that the Vincennes had been "defending itself in international waters" at the time, and that it was all the Iranians' fault for "allowing" the Airbus to fly near the Vincennes -- but 4 years later after a joint Nightline/Newsweek investigations US Navy Admiral Crowe admitted that the Vincennes was in fact in Iranian waters, making the claim of self-defense nonsense. Others including the Capt Carlson of the USS Sides, have written that the Capt Rogers III of USS Vincennes was overly aggressive and the ship was called "Robocruiser" as a result. http://www.usni.org/magazines/proceedings/1993-08/vincennes-case-study The official explanation was a whitewash which claimed that the "fog of war" was responsible for the confusion on the Vincennes - but carefully avoided asking why the Vincennes was inside Iranian waters in the first place.
The Newsweek article contends that the event was actually part of a US navy strategy of attempting to draw out the Iranian navy so as to clobber it, but it went awry http://alt-f4.org/img/seaoflies.html
The transcript of the famous Nightline interview with Adm William Crowe, complete with side notes, is available http://homepage.ntlworld.com/jksonc/docs/ir655-nightline-19920701.html
Vincennes crew were given medals for the "successful" end of their tour. The US Navy's investigation by Adm Fogarty was a total whitewash which went as far as to erase an island from the map presented to the public Congressional investigations. Several threories were floated in the media to justify the downing, including that the Iranians had placed already-dead bodies on the plane and deliberately aimed it at the Vincennes to score propaganda points (Howard Stern was a fan of this view.) Capt Roger's wife - a school teacher - had her van blown up, and with the assistance of the US Navy she wrote a book called Storm Center claiming to be the true victims of terrorism -- but the only actual suspect for her van bombing was a former family friend who had a personal grudge. Iran saw this event along with US support for Iraqi chemical weapons as the last straw and decided to stop the war and trying to topple Saddam -- thus freeing Saddam to look keenly at Kuwait.
Iran sued the US at the ICJ but the US settled with Iran, agreeing to pay compensation but without accepting any responsibility for the event. The US courts refused to consider any lawsuits by the victims' relatives on the grounds that the courts don't get involved in war matters. The ICAO report on the shootdown confirmed that the Vincennes was inside Iranian waters and that the Airbus would not have been able to respond to the hails sent to it since they were sent on a military channel or had wrongly identified the airbus
Iranian F-14s couldn't attack surface vessels at the time.