The general position of theists is that atheists are incapable of any sort of moral certitude. The argument goes that atheists have no basis for morality, no ethics, no nothing. Because Atheists believe in nothing, they have no check on their selfishness and lived hedonistic lifestyles. They did whatever they feel best, whatever pleases them most.
The reasoning for theists is that for absolute moral law, there must be a lawgiver. The analogy used is human law that requires a legislature to make the law, and a judiciary to enforce it. The problem with this reasoning is that theists are conflating two different concepts - morality, and legality. It is true that law requires both a legislature and judiciary, however, as demonstrated by Jim Crow, as well as other laws, having a lawgiver is not, itself, a guarantee of moral, or just laws. Thus the analogy, as well as the premise rather falls apart.
So, what guarantees that moral laws are, in fact, moral? Logically it must be that the law-enactors and enforcers are acting within the confines of morality. However, this requires that morality had to proceed legality. The only way to insure that a lawgiver is moral is that their laws conform to a morality that is independent of the lawgiver, and to which the lawgiver is confined. So, if the lawgiver is God, then they can only be moral if they conform to a morality that is independent of God. However, according to theists, there is no morality independent of God.
Socrates make this exact point when he asked "is good good be cause it is good, and good gods choose good, or is good good, because the gods choose it? If it is the former then good is simply good, and God has nothing to do with it; God is only "good", because He chooses to do that which is good. If it is the latter, then good is entirely arbitrary and is solely dependent on God's whim.
So, the question becomes, if God cannot, logically, be the source of morality, then what is, and how does one know what is "good"?
We all have a code of morality, even if we don't believe in a God.
We are wired to develop morality based upon authority figures we esteem. The source can be our parents, teachers, pastors, law makers, peers, etc.
Case in point is slavery. When slavery was legal the general consensus was that it was not ideal, but it was OK. Now after centuries of being illegal, the average consensus is that slavery is morally reprehensible.
Abortion is also comparable. Before Roe vs. Wade, the general consensus was that abortion was immoral. However, decades after abortion has been made legal, the average consensus is that abortion is not ideal, but it is OK.
Gay marriage is the same. 50 years ago the average consensus would have been that it is immoral. Today, however, now that it has been legalized the average consensus is that it may not be ideal, but it is OK.
It is somewhat humbling understanding what lemmings we are. Pass a law and watch morals change accordingly. I guess it then behooves us on which authority figures we esteem enough to let them guide our moral compass.
Having said all that, I would say that we are all guided by an internal universal morality that can be summed up by the Golden Rule which is to do unto others as you would have them do to you. That meant that to rationalize slavery as OK, the first step was to dehumanize them as being subhuman, or a glorified ape. Only then can you then treat them like beasts of burden or even kill them if need be. And we see this time after time as Jews are compared to vermin or nonMuslims are infidels or the unborn are merely a fetus. Only when you dehumanize people can you then abuse them with a clear conscience.