"You can be good without God" has become a popular slogan among campaigning atheists lately. As with most political slogans, close inspection reveals it to be a trivial assertion. Monotheism is a recent phenomenon in human history, having emerged only a few thousand years ago. Humans emerged either 200,000 or 40,000 years ago depending on how you define the term. In either case, does anyone think that for the tens of thousands of years or more before there was any "God," (or idea of "God") there were no good people? My guess is that the "good without God" chant is principally designed to provoke simple-minded religious folks into a shouting match about God and morality. To that end, it is (sadly) probably successful.
The interesting issue -- the one upon which productive discussions can be built rather than useless shouting matches -- is not whether you can be good without God, but what role religious beliefs and practices play in morality. From the get go, however, we have to be clear on what we mean by "morality." For most of human history, morality simply meant "adherence to group norms." The idea of some universal moral code that applies equally to people of all tribes, races, ethnic groups, etc. is a very recent idea and one that exists far more as a noble aspiration than a regularly implemented practice.
Group norms, of course, can vary substantially from one group to another but what they all have in common is the notion of restraining self-interest in favor of larger interests -- those of the group. For example, among many hunter-gatherer groups boastfulness is socially proscribed. As much as one might believe that he has legitimate cause for touting his own talents and accomplishments, doing so would only make him the butt of nasty jokes and scornful gossip. By effectively restraining a certain degree of individualism, this anti-bragging norm helps keep the group harmoniously humming along. In our ancestral past, group harmony was not trivial. The group was life. Outcasts were as good as dead. Thus it makes sense that humans would evolve a natural moral sense. Some religious folks may not like hearing it, but it is simply the case that morality (that is, adherence to group norms) arose out of social life, not religion.
In many respects, our natural moral sense is similar to language. Children are born with an innate capacity for acquiring language. However, the specific language they speak depends on their environment. Likewise, we have a natural tendency to acquire the rules necessary to get along in our social groups and cultures, but the specific moral code we internalized depends on our environment. Young children are especially sensitive to any social information about "good" and "bad" behavior. Indeed, noted Stanford psychologist Carol Dweck claims that toddlers and young children are nothing less than "obsessed with goodness and badness," (see M. Tomasello's Why We Cooperate p. 133).
This, however, does not mean that religion plays no role in moral behavior. Religion has two potent mechanisms for getting people to put the group's interests ahead of their own. One is belief. Religion adds a supernatural layer to social life in the form of gods, spirits, and ancestors who are often considered as relevant to one's everyday functioning as family, friends, and co-workers. These supernatural agents are not just blithe spirits flitting about enjoying the afterlife. They are keenly interested in one's moral behavior. In traditional societies this often takes the form of honoring tradition and avoiding taboo -- essential to keeping on good terms with the ancestors. Even in modern societies, belief in God and the afterlife is associated with a less tolerate attitude toward moral transgression. Indeed, a very recent study shows that the belief in a punitive God reduces cheating, while belief in a loving God actually increases it (see The International Journal for the Psychology of Religion, 21, p. 85).
The second important mechanism is ritual practice, a powerful means of instilling a sense of group identity and commitment to group-based values and norms. For example, Jewish Orthodox men who regularly engage in public rituals such as daily prayer are more generous and practice greater self-restraint compared to either secular Jews or religious Jews who don't pray.
The combination of belief and ritual participation acts as a kind of moral practice where one is regularly studying and enacting one's religious moral code. This moral practice has its greatest impact in the area of self-restraint. Numerous studies show that, by and large, religious people practice more self-restraint and self-regulation than non-religious people. To the degree that moral behavior intersects with self-restraint, religious people tend to be more "moral" than their non-religious counterparts. This shows itself in such areas as avoiding criminality, delinquency, substance abuse, and risky sexual behavior. It may also play a role in the fact that religious people tend to be more successful academically and they engage in more volunteerism and charitable giving.
There is a decidedly "dark side" to this, however. Some forms of religious belief, especially fundamentalism, have been associated with higher degrees of prejudice, authoritarianism, and right-wing extremism. Furthermore, greater ritual participation is linked with more accepting attitudes toward the use of violence against perceived enemies or out-group members. To the extent that immoral behavior intersects with out-group animosity and aggression, some religious folks may be distinctly less moral than their non-religious counterparts.
Aristotle was one of the first to argue that morality was a trainable skill. Effective moral training requires that one have a set of moral ideals to which one aspires and regular "training sessions" where one both studies those ideals and tries to put them into practice. Religious scriptures and worship services often provide effective venues for moral study, practice, and therefore the elevation of moral skill. One might take issue with the content of some religious moral codes, but the point is that the code is there as are the "training" opportunities. If atheists or secularists want to offer an alternative to religious morality, then it would appear that their first challenge is to agree on what the content of their morality will be (e.g. is abortion moral or not? Is extra-marital sex wrong or not? etc.) and how that code will be inculcated and reinforced among the masses.
Note: for references see Science, 322 p. 58; Social and Personality Psychology Compass 4, p. 574; Psychological Bulletin, 135 p. 69; or chapter 7 of my book, Supernatural Selection.