It can, and sometimes does, but so does politics, ideology, race, and gender. Atheists often caricature religion as the most corrosive force on earth, but as Alister McGrath points out, this is sociologically and historically naive.
Suppose [Richard] Dawkins’s dream were to come true, and religion were to disappear. Would that end the divisions within humanity and the violence that ensues from them? Certainly not. Such divisions are ultimately social constructs which reflect the fundamental sociological need for communities to self-define and identify those who are “in” and those who are “out,” those who are “friends,” and those who are “foes.”
. . . . A series of significant binary oppositions are held to have shaped Western thought—such as “male-female” and “white-black.” Binary opposition leads to the construction of the category of “the other”—the devalued half of a binary opposition—when applied to groups of people. Group identity is often fostered by defining “the other”—as, for example, in Nazi Germany with its opposition “Aryan-Jew.”
. . . . The simplistic belief that the elimination of religion would lead to the ending of violence, social tension or discrimination is thus sociologically naive. It fails to take account of the way in which human beings create values and norms, and make sense of their identity and their surroundings. If religion were to cease to exist, other social demarcators would emerge as decisive . . . [As they did, for example, during the French Revolution and in the Soviet Union.]
Michael Shermer, president of the Skeptics Society, has made the significant point that religions were implicated in some human tragedies such as holy wars. While rightly castigating these—a criticism which I gladly endorse—Shermer goes on to emphasize that there is clearly a significant positive side to religion:
“For every one of these grand tragedies there are ten thousand acts of personal kindness and social good that go unreported . . . . Religion, like all social institutions of such historical depth and cultural impact, cannot be reduced to an unambiguous good or evil.”
— Alister McGrath, “Is Religion Evil,” God is Great, God is Good (IVP, 2009), 129-131.