When I was a child being indoctrinated into Christianity, I don't remember anyone explicitly telling me that I was morally superior to atheists because I believed in gods. I don't think they had to. The implication was clear whenever hell was mentioned. People who didn't believe what I believed were going to hell, and good people didn't end up in hell. Like most of the rest of it, this bit of the indoctrination stuck. I believed it. I had no reason not to.
I think it helped considerably that I didn't know any atheists. As a child, I only knew a couple of non-Christians. I would eventually ask questions about their eternal future and discover that I didn't care for the answers, but that would come later. Not knowing any atheists meant that I had no counter-examples of good people who were atheists. I never had the opportunity to ask those questions and hear nonsensical answers. I had plenty of counter-examples in the form of morally horrible Christians, but it would take me a while longer to figure that out.
The fact that I accepted and internalized this nonsense about the moral inferiority of atheists sure did make the realization that I no longer believed in gods more difficult than it might have otherwise been. I remember those sleepless nights. What had happened to me that I could doubt the existence of gods? How could I have turned out to be such an awful person? What sort of future would I now have? I'd eventually recognize that I was no more or less moral as an atheist than I had been as a religious believer, but it took awhile.
It would not be until college that I met someone who openly identified as an atheist. I had been the only one I knew doing so before then, and the reactions were less than positive. As soon as I met one atheist, I met two, then three, then four. It seemed like I went from knowing none to knowing a handful almost overnight. Not one of them was morally inferior to any of the Christians I knew. Not one of them stood out as a moral degenerate of any sort. Not one of them was the sort of person Christian me would have thought belonged in hell.
It would be around this time that I had some interesting conversations with Christians who still regarded atheists as morally inferior. They tended to bog down at the same point in much the same way. The Christian would insist that atheists were morally inferior, and I'd ask why. They'd respond with something along the lines of how someone who didn't believe in their preferred god could not be moral. I'd summarize their "argument" as follows:
Let me make sure I'm understanding you accurately. You're saying that atheists cannot be moral because we do not believe in your god, right?
The Christian would agree that this was what he or she was saying, and I might say something like this:
As you know, an atheist is, by definition, someone who does not believe in gods. It sounds an awful lot like you are saying that atheists cannot be moral because we are atheists (i.e., we do not believe in gods). Atheists are immoral because they are atheists. That's not much of an argument. What is it about god-belief that you think is a necessarily condition for morality? Could a child who has never heard of your god be moral? Could a practitioner of another religion who believes in a different god be moral? And if god-belief is necessary for morality, is it also sufficient? Is everyone who believes in your god moral?
Few Christians were up to the task of trying to come up with a better argument than "atheists are immoral because they are atheists." The few who did quickly became incoherent. I've yet to hear a compelling argument for the claim that god-belief is necessary for morality. Needless to say, I think that the belief that some religious believers have that atheists are morally inferior has done considerable damage and is an important one to overcome.