Some very simple reasons for the decline of church membership:
1. In a multicultural world, it is hard to believe that any religion can have a lock on truth and that non-Christians are consigned to hell for making a theological error. I once had a fundamentalist preacher tell me that most non-Christian six-year-old children are going to hell. No, thank you.
2. Christian parents are often overly punitive and many kids abandon the religion because they hated their parents' harshness. Read the two books written by Pat Boone's daughters for some insight into that. It simply stinks to be raised in a religious home--not always, but often. And Christian kids do not have better life outcomes.
3. The "no sex before marriage" rule may be a good one but we live in an era in which puberty comes earlier and marriage comes later because of the extended schooling needed to be successful. Caught between biology and religion, most young will side with biology.
4. Face it--church is boring when you can have TV, the internet, and video games.
5. Modern genetics and the awareness it brings--how close we are to animals, how many personality traits have a strong genetic component--make it harder to believe traditional Christian dogmas like free will.
6. If people have a real problem, they would rather trust science because it is more effective than prayer.
7. I find that seeing certain issues like same-sex attraction and sexual identity through a scientific lens makes people more compassionate while the religious are often the opposite.