Atheist Richard Dawkins lays this position out quite clearly in a piece he wrote for Edge in 2006. Here's part of it:
Retribution as a moral principle is incompatible with a scientific view of human behaviour. As scientists, we believe that human brains, though they may not work in the same way as man-made computers, are as surely governed by the laws of physics. When a computer malfunctions, we do not punish it. We track down the problem and fix it, usually by replacing a damaged component, either in hardware or software.Let's assume that Dawkins is right and that our actions are determined by factors outside our control. If so, then our choice to embrace atheism or theism, determinism or libertarianism, evolution or creationism, or our choice whether to be kind or cruel, selfish or unselfish, is an illusion. There are a host of factors at play in determining these decisions, among which evidence and reason may be only one. Our decision to embrace one side or another, to act one awy or another, is predominantly a function of our genes, physiology, or childhood environment, and thus whichever we choose to believe the choice is essentially non-rational.
Basil Fawlty, British television's hotelier from hell created by the immortal John Cleese, was at the end of his tether when his car broke down and wouldn't start. He gave it fair warning, counted to three, gave it one more chance, and then acted. "Right! I warned you. You've had this coming to you!" He got out of the car, seized a tree branch and set about thrashing the car within an inch of its life. Of course we laugh at his irrationality.
Instead of beating the car, we would investigate the problem. Is the carburettor flooded? Are the sparking plugs or distributor points damp? Has it simply run out of gas? Why do we not react in the same way to a defective man: a murderer, say, or a rapist? Why don't we laugh at a judge who punishes a criminal, just as heartily as we laugh at Basil Fawlty? Or at King Xerxes who, in 480 BC, sentenced the rough sea to 300 lashes for wrecking his bridge of ships? Isn't the murderer or the rapist just a machine with a defective component? Or a defective upbringing? Defective education? Defective genes?
Concepts like blame and responsibility are bandied about freely where human wrongdoers are concerned. When a child robs an old lady, should we blame the child himself or his parents? Or his school? Negligent social workers? In a court of law, feeble-mindedness is an accepted defence, as is insanity. Diminished responsibility is argued by the defence lawyer, who may also try to absolve his client of blame by pointing to his unhappy childhood, abuse by his father, or even unpropitious genes....
But doesn't a truly scientific, mechanistic view of the nervous system make nonsense of the very idea of responsibility, whether diminished or not? Any crime, however heinous, is in principle to be blamed on antecedent conditions acting through the accused's physiology, heredity and environment. Don't judicial hearings to decide questions of blame or diminished responsibility make as little sense for a faulty man as for a Fawlty car?
Moreover, no one can be obligated to make a choice that, in fact, they can't actually make, nor can they be thought responsible for making the "wrong" choice. There would be no wrong choices. There would only be choices whose consequences some people like and others don't.
Dawkins claims in the Edge essay that the illusion of responsibility for choices is a "useful fiction" that evolution has built into our brains over the eons, but why would natural selection, a process that is constantly striving to conform us to our environment, to reality, create in us something, the illusion of free will, that is so at odds with reality. Evolution hasn't done this with any other animals that we know of. Why us?
Even Dawkins implies in his closing sentence that he can't live according to his own beliefs in this matter. He can't avoid holding people responsible, assigning guilt and praise, and acting as if people really do have choices even though he's convinced they don't. Dawkins can't help believing that there really is moral good and evil even though, given his determinism, his belief is irrational.
Scientists and philosophers are guided by a principle that says that the simplest explanation that fits all the facts is always to be preferred to more complicated hypotheses. It seems to me that the simplest explanation is that we experience things like guilt and a sense of moral responsibility because we really are guilty and responsible. When one's beliefs are so incompatible with our experience that we cannot live by them then there's probably something amiss with those beliefs. The simplest explanation for our overwhelming feelings of freedom and responsibility is that we really are, in some sense, free and responsible.
Any worldview that makes things more complicated by telling us that these convictions of freedom and responsibility are illusions created by an evolutionary process that one would expect would strive to disabuse us of illusions carries with it a burden of evidence that materialism simply can't bear.