20th century atrocities
One popular argument against atheism is the observation that some of the worst atrocities of the 20th century, such as the purges of Stalin and Pol Pot, were carried out by atheists. Often, the list of atrocities includes Hitler's holocaust. While there is good reason to believe that Hitler was a theist, this does not affect the argument or its rebuttal.
To begin with, it is true that the 20th century saw many atrocities carried out on an unprecedented scale. And many of these atrocities were, in fact, carried out by atheists. So the statement as presented is true. Where it fails is in its often unstated conclusion, that atheism leads to immorality.
Atheism vs. irrationality
Since atheism per se has no dogma, it is difficult to find a causal link between atheism and immoral behavior or the commission of atrocities. It is often much easier to find a cause rooted in some other belief held by the perpertrator. For example, the statement "Stalin ordered thousands of people executed because he was an atheist" is, on its face, a non sequitur. On the other hand, "Stalin ordered thousands of people executed because he thought they represented a threat to the establishment of communism", while irrational and abhorrent, at least enjoys a certain internal consistency.
Technology and population
The argument sometimes includes casualty numbers: 1.7 million people died in the Cambodian genocide, and Stalin's actions resulted in the death of at least 3 million people, to name but two examples. By contrast, one source puts the total number of casualties in all of the crusades from the 11th to 13th century at 9 million.
However, one can no more compare raw casualty numbers in different centuries without taking population numbers and technology into account, than compare box office receipts for movies released in different decades without taking inflation into account.
Human population has been growing exponentially for thousands of years, which means that countries in the 20th century were able to raise much larger armies than in earlier centuries, simply by virtue of having a larger population.
In addition, the mass-murderers of the 20th century had access to much better technology than those of any earlier century, including gunpowder, high explosives, automatic weapons, industrialization (which permitted the manufacture of large numbers of weapons), and rapid long-distance communications (which allow coordination of combatants in different places).
In the 21st century, nineteen people were able to kill 3000 people by flying two airliners into the twin towers of the World Trade Center. Such an attack would have been impossible before the technological advances that permitted the construction of airliners and of skyscrapers capable of housing thousands of people in one place.
Thus, we must ask how many people would have died if one of the crusades had taken place with 20th or 21st century weapons. A religious war of extermination by England or France against Israel could easily involve nuclear weapons, which would most likely cause more than the nine million deaths the real crusades did.
Hitler and the Holocaust
Often, the list of 20th century genocides includes the Holocaust, and the claim that Adolf Hitler was an atheist. Although there is no reason to believe that Hitler was an atheist, and good reason to think otherwise, we may also assume, for the sake of argument, that Hitler was really an atheist who pretended to be Catholic for the purpose of misleading the German population.
We may then ask, why would he find it necessary to use religion to recruit people to help carry out his genocidal plans? If he could have swayed the population using rhetoric and propaganda, but not religion, why did he not do so? This seems to be an indictment of religion. If religion prevents immorality, why is it that it can so easily be subverted to cause people to perform immoral acts?
The idea that gulags and death camps are the end game of reason and skeptical inquiry is wrong; no atrocities are the result of being too skeptical, too reasonable, too rational, questioning the prevailing dogma or wanting evidence for claims. This argument only serves to keep the pressure away from questioning religion.
When refuted, it is made again ad nauseam. Richard Dawkins and Sam Harris both refuted the argument in their books and still a large preponderance of reviews contained the argument again as a rebuttal to their work. The argument serves as a Reductio ad Hitlerum implicitly accusing atheists of being like Nazis or Stalinists.
Atheists vs. Atheism
Atheism is the lack of belief in god(s). It contains no dogmas, rituals, actions, belief systems, tenets, etc. There is nothing about atheism which would provide a causal link between atheism and any action.