Religion is a shaper, but there's only so much defined in religion. Example: Religion doesn't say anything about illegal downloading. It's not exactly the "stealing" talked about in the bible, because hey nobody loses anything, just potential profit. There's no exact matching scenario in the bible...you kind of extrapolate. Where does the rest of your morality regarding such matters come from? Oh yah, your brain! Your common sense. Oh, what's that? Right, common sense is based on society -- norms and outside influences.
Now sure, religion is a big part of people. It has strong ties with society, helping to shape the morality found in societies. Remember how parts of the bible were once used to justify slavery? Does anyone try to use the bible to support slavery anymore? Psh. But hey, if your religion says you can kill people, you wouldn't (logically speaking) just do so in any country today, because you make the decision in your brain "I won't do it or I'll go to jail." Society says no." Same with stuff like gay marriage. Some Christians learn to adapt to having members of the homosexual community in their congregations. Others can't deal just yet cause people dislike change. Regardless, in 100 years, it's a nonissue and virtually everyone agrees, morally speaking. Society wins. It happened with segregation, it happened with gender barriers, it'll happen again.
Disclaimer: I am religious, I'm a Christian to be exact. But yeah, I don't claim that Christians are any more moral than anyone else. Morality is relative from a perspective that doesn't assume existence of God.
^ if you're a Christian, do know that I believe in moral absolutes. But that's only assuming the existence of God, because in that sense morals are defined by the nature of God.