The geostrategic importance of Afghanistan has a history dating back to its origins as as nation-state. Although Afghanistan has existed as seperate state since 1747, its current borders evolved only toward the end of the last century (1880-1901) as an outcome of rivalry between British India and Tsarist Russia. Afghanistan was created as a geopolitical "buffer zone" between the two great powers in the region.
Afghanistan's location denied it the resources for it to be a politically and economically stable state - and successive Afghan rulers have maintained stability by sourcing revenue (i.e. plundering) from its neighbours. With this in mind, both India and Russia variously contributed resources to Afghanistan to maintain the geopolitical balance of power. Afghanistan (as a state) was more than happy to play as buffer.
This of course changed with the onset of the Cold War. As Russia feared the loss of its longtime buffer to the West, it invaded and the subsequent proxy war irredeemably changed the geopolitical landscape. When Russia eventually withdrew from Afghanistan, the US-supported mujahideen took control. Instead continuing the support for the buffer state, America's subsequent withdrawal from the region caused a power vacuum, allowing sectarian interests (the Taliban) to seize control. As Afghanistan had been abandoned by both Russian and the West, the Taliban had no interest in acting as buffer, and pursued their own agenda.
As Fox Hunte describes above, the new strategic importance of Afghanistan became rooted in the geopolitics of oil, rather than as a buffer for great powers.