I believe that morality is derived from a combination of factors and sources.
Family, culture and religion definitely influence morality. Those "seekers" out there who actually read scripture, philosophy and literary classics for their insights into the human condition are also influenced by their quest. Finally, there's abundant evidence that evolution contributes a hereditary component to morality. Empathy and altruism have obvious survival value for social animals such as us humans and other primates.
But none of these factors are necessarily dominant, nor are they the same for everybody. For instance, scriptural influence can be undone by a personal quest.
The factor I find most intriguing is the evolution of empathy. In our tribal days, before religion existed, experience informed us of what hurt or angered us, and empathy told us that the same things probably hurt and angered others as well. This combination of experience and empathy is enough to instill a generalized "sense" of the Golden Rule between tribe members -- Do unto others as you would have them do unto you . . . because we need each other to survive. The Golden Rule, in practice, can be further distilled to: "Do no unnecessary harm."
Nobody is born with a moral code, of course, but empathy and experience are commonly shared by virtually all of us (except aberrant cases): it's part of the human condition. We start developing empathy as toddlers, maybe earlier. As we mature, this "moral intuition" matures: often without our realizing it. This moral intuition is the crux of the Hippocratic Oath and should be the essential principle of our laws. I believe it constitutes a moral substrate that is often more powerful, in some of us, than the morality we learn from other factors. I think this is because it's what we learn first-hand, through observation and experience. All the other sources I can think of are second-hand, from: other people, scripture, literature and authorities.
We actually see the power of moral intuition (and/or other non-religious sources of morality) at work when we consider religious reforms. We no longer tolerate slavery, the subjugation of women, battlefield excesses, child brides, or criminal punishments disproportionate to the crimes committed. These are all values upheld by the Bible, yet we've long since rejected them. In effect, our non-religious morality has overruled and usurped religious morality. Our non-religious morality actually decides what IS religiously moral.
If our own morality actually decides what is religiously moral -- why have religious morality in the first place?