I learned from Tyson's 'Cosmos' that Muslims were great pioneers in science hundreds of years ago. What happened to them? When did they begin to shun science?
I doubt you're going to get an answer to this question here. Your question is predicated on the notion that Muslims "shun science", which is not the kind of assumption you'll find in historical discussions of Islam.