Religion claims to hold a monopoly on morality, each claiming that their divine entity is the judge, jury and executioner in regards to moral rule, after death. This is a fundamentally worrying principal.
Not all religions are an issue here, or to say, not all people who practice a religion are an issue. An issue specifically arises when the reason people decide to to "good", or not to do "bad", is because of their after-life fate. Teaching this to children, and using this as an acceptable justification for doing good, or not doing bad, is unethical, stupid, and potentially dangerous.
Firstly, believing that it is up to another being (weather divine or not) to judge your morality, means you sacrifice yourself to whatever they deem to be moral.
An example of this is extremest Islam. 9/11. The hijackers who flew planes into buildings, did so believing they were doing good. Because they defined their morality by "the word of god", they were susceptible to suggestion to follow "god's will". Unfortunately, their interpretation of "god's will" required them to kill infidels, people not of their faith; sacrifice themselves in order to prove how good and dedicated to god they were. Complete trust in another for judgement of morality takes away any power you have to decide what is moral or immoral.
Secondly, if at any point through out the life of an individual who grew up being taught "don't be bad or you'll burn in hell", decides to believe there is no hell, no heaven, and no god, suddenly has no reason not to be bad. This might be okay for adults, because they normally have a developed sense of empathy, but for children it is a different story. If a child has always been taught "be good or you'll go to hell", "be good or mum will punish you", "be good or you won't get dinner", they don't have a developed sense of empathy. The child who hasn't been taught to think about the feelings of others, won't unconsciously take them into account before making a decision about an action.
The solution to this problem is to not be a dumb fuck and think for yourself. Center your moral base around the philosophy "Act as to prevent suffering and the suffering of others". This guards against outside manipulation of your moral principals. Teach children to think about how their actions affect other people, and teach them to act to not hurt, or hurt the feelings of others. This after all, is in itself, a more moral, moral code.