Mary Eberstadt argues that one cause of the decline of religion is the decline of the family, in particular, the reduction in fertility. Fewer of us are going to church because we’re having fewer children, rather than having fewer children because we’re less likely to go to church. The argument isn’t quite as implausible and reductionist as it sounds: I think she has her finger on one of the natural mechanisms that prompt both wonder and orientation toward the future. If you want to, you can say "one of the natural mechanisms that God uses to prompt both wonder and orientation toward the future.
And even if you’re not completely persuaded, the article’s notes offer quite a tour through the contemporary literature on religion and the family.