The Taliban destroyed the opium trade because they could not control it, and it enriched warlords and drug networks who could have been a threat to them. When we invaded, and kicked them out of government, they allowed it and part of their funding comes from taxation of the crops and 'protection' for runners who take it into Pakistan (pay us or we'll jack you, basically).
The US was in charge of Helmand/Kandahar (the major production provinces) from 01 to about 05, it made no sense to try and stop it then, as they didnt have enough troops in the area, nor did they want to alienate the farmers, however the Americans there, and NATO as a whole failed to ensure the new government behaved. So you had corrupt government officials running around all over the place messing with everyone. This lead to lots of frustration for the people and led to the Taliban being able to re-establish themselves there in a legit manner.
Its an important distinction between insurgents and taliban. Insurgents are all kinds of groups, they arent one body and they dont all want the same thing, some are simply tribal militias who happen to not like the government because their tribe is a minority in the area and the majority tribe makes up the district/provincial government and gets all the money, etc. All kinds of very different stories and reasons, most are good people just looking out for their own. These differences can be dealt with by improving governance, and we could make allies out of them.
The real problem is the Taliban, they are the real deal, and allowing them to re-establish themselves in Kandahar (their former capital, their centre of gravity outside Pakistan) and Helmand (their financial hub) was the biggest mistake we could've made. Obama has the right idea but I think its too late. Op Moshtarak by the Marines in Helmand was a good initiative, however it should have occured in 05-06 instead of 2010.
Instead of reinforcing the US contingents with Canadian and UK battalions as soon as things went hot in Helmand/Kandahar, they pulled the US battalions out and sent the Canucks and Brits in alone (about 6000 troops to start IIRC). We spent pretty much all of 06-07 just killing Taliban instead of focusing on governance and reconstruction, add on top of that the fact that neither the Brits or us had enough troops to hold much of what we cleared, so they just kept coming back. So yeah, you can imagine how low on the to-do list opium was (and is). Not to mention, despite having faced the brunt of the fighting in Afghanistan, things have improved in Helmand/Kandahar, but its a fragile split between support for ISAF/Taliban, and carpet bombing opium field is pretty much the worst possible thing to do at the moment.
Basically, its all messed up because of Iraq and the strain that put on the US mil.