Terrorism expert Peter Bergen writes in the New Republic's most recent cover story, "Today, Afghanistan resembles nothing so much as Iraq in the fall of 2003, when the descent into chaos began." In searching for why that's the case, he identifies four primary factors.
1. Allowing Osama bin Laden to escape at Tora Bora.
2. Under-funding and under-manning the reconstruction of Afghanistan, and refusing international help early in that process.
3. Turning the military's attention to Iraq before Afghanistan could be stabilized.
4. Appeasing, and not demanding more out of, Musharraf and the Pakistani government.
The whole thing is worth a read, but if you want an easily digestible yet expanded list, take a look at something Bergen put together for Mother Jones this past summer. We call it "The Iraqization of Afghanistan."