Correlation is not causality - most of the Muslim nations you're thinking about were also coincidentally victims of colonialism - after which they were used by us as pawns. Afghanistan for example, started as a British colonial buffer zone to protect interests in India - and then was carved into by the Soviets as part of the Cold War, after which the Americans aided, encouraged, and outright
armed radical fundamentalists and told them to go kill some Russians. Is it any real surprise that they ended up with a brutal, fundie dictatorship?
(By the way, Afghanistan's history of being a warzone stretches back waaaaay further than just 30 years, way before the Soviets)
And Iran, that most favourite of whipping boys now that Afghanistan and Iraq are off the map. They were doing just peachy with a liberal, relatively secular, democratic government until Mossadegh kicked out Western oil interests. After that the gloves were off, and the Americans engineered a coup and installed a radical fundamentalist puppet instead. Turns out he wasn't so much a fan of America.
(though to be fair, the Shah kind of had it coming. He had a particularly nasty case of murdering political dissidents... though after Khomeini it became unimaginably worse)
Note: this is not to mean that the Middle East was not without its own problems. It would be entirely unfair to pin the blame solely on Britain and the US for the national failures that litter that subcontinent. That being said, where you see a dramatic failure of government, British or American interventionism is never too far away, and the current woeful state of Iraq, Iran, and Afghanistan (disregarding recent wars, i.e. <2000) can be traced directly to Western interventionism.
And furthermore, traditionally Islamic nations such as Saudi Arabia and the UAE are doing just fine for themselves. In fact, if you put all of these nations side by side, it seems that "crossed the US/Britain" is a greater predictor of misery than "is Islamic".