The Righteous Almost Everyone - Most Five-Year-Olds Follow the Golden Rule
Do unto others as you would have them do unto you.
Rabbi Harold Kushner, famous for writing "When Bad Things Happen to Good People", wrote another book on what it's important to teach your kids. I forget what it's called. Anyway, in it he compares religions. All the major religions have the golden rule, some version of "Love your neighbor as yourself."
This simple rule, it seems to me, is the basis of morality. Every psychologically intact five-year-old intellect and above does their best to follow the golden rule. This holds for atheists and agnostics, of which i am one. (I was a born-again Christian from age 8 to 22, but reasoned my way out of it. I knew the golden rule before I was a Christian. My Sunday school teachers thought I was a Christian before I was one because of the way I treated others.)
Those who have inconsistent or less-than-compassionate parents may not get the message. Yep, before the age of five, our personalities are elastic. What happens then determines if we turn out to be psychopaths or sadists. I can't say that even these unfortunate folks are not righteous. They do the best they can within the limits of their flawed personalities and disabling past. Don't get me started on free will or its lack.
The reason psychologically intact (PI) people follow the golden rule is that they're capable of forming bonds with other humans. If person PI hurts someone person PI has a bond with, he or she will hurt, too. Call it empathy. Call it conscience. I feel better and feel better about myself when I treat you well.
My thanks to Mark Knowles for hubbing "The Righteous Atheist" and inspiring this hub.