Before someone jumps on this post thinking "Religion is not dead!", I realise this. I'm not saying religion has died, or that it will ever cease to exist. What I think is happening to religion, is that it is fading out of relevance. The social relevance of all religions is dying, and in many places around the world it is already dead. People do not need to turn to religion to answer the 'big questions'. People do not need to turn to religion as a basis for morality.
Many religions constantly have to evolve to keep up with societal trends or else they face an extinction of irrelevance. Some try to stick to their old ways, like the subservience of women to men and homophobia, but these groups are more often than not shunned from modern society for being bigoted. The last nail in the coffin in my opinion is the idea that one must be a member of a particular religion to attain salvation (whatever that might mean in a particular religious tradition). Once this idea is abandoned by more and more members of religions, and all that is required is to live a good life, religion will die a slow death into irrelevance. If one can attain Nirvana, or get to heaven without following a religion, why follow it? If people can free up more time in the day to go about my business and to improve the world they live in rather than practice religion, they are likely to do so.