People are so easily confused over this. I just got home from Afghanistan a couple months back, so i would hope my thoughts qualify. The Taliban was a hyper-conservative group of Islamic facists who came to power in Afghanistan after the Soviets fell back in the late 80's. They follow a strict interpretation of the Koran, ignoring all the parts about not spreading misery (there isnt much of it, but it IS there) and really enjoying the parts about making women second class citizens and putting clergy in charge of most major decisions. It was a borderline theocracy, in that any line a mullah dropped was almost instantaneously turned into law.
They were a state sponsor of terrorism, especially terrorism against the west (Terrorism is using fear to achieve your goal, normally a political goal, just so we are on the same page). This is for any number of ideals and ideas, i am sure everyone there has their own personal grudge and vengence they are after. They funded known terrorist cells, gave them safe haven and support. The Taliban was never in Iraq, as it would have started to undermine Saddam Hussien's power. He would have ruthlessly and efficiently stomped it out, killed it's members and imprisoned anyone he was unsure of. The taliban knew this, and NEVER made a play for Iraq. They were never there, never recruited from there in meaningful numbers, never trained there and never used it as a base for any serious operation.
For whatever reason, George W. Bush decided invading a country that had never even looked sideways at the United States since the first Gulf War was a brilliant idea, and bombed it back to the stone age. Most of the September 11 hijackers were from Saudi Arabia, a suppossed friend of the United States (they are not, but they enjoy getting billions of dollars from us). This war and the deaths it has caused can be laid at the feet of the Bush white house, and no one else.