A recent Pew study has been released that shows atheists/agnostics are more knowledgeable about religion than those who hold religious beliefs. That's not a surprise. The next news story is going to be "Water is wet", I bet!
I spent many years of my life as a Catholic of sorts. I went to a Catholic school, I attended a Catholic church, was baptized, received first communion, was confirmed, was an altar boy and basically did as most Catholics do - went through the motions and never really paid attention.
As we encounter social injustices, some of us look at them and consider how we can help make them right - correct them or even avert them in the future. When the social injustices are being caused by the very beliefs you have, you can look for reasons that you hold such beliefs - to justify why you do something or why you allow something. If you can't find support for those beliefs, you try to change them or drop them. My move from a "whatever" Catholic to an outspoken atheist came about as a result of that sort of process.
Since many atheists/agnostics were once religious - they've had to examine the doctrines of their faith and the claims made by their priests/pastors, etc. Many of us have read the literature, have tried to side with apologetics and have tried to justify our faith without resorting to "simply because that's what my faith demands".
For me, being surrounded by people who held beliefs in god and were very religious, it meant that I had to be fairly certain of my position and willing to defend it logically before I could finally toss out the bath water. I had to ask the questions of others that would be asked of me. The more that I looked for justification of my faith or redeeming qualities in the doctrines, the less I could bring myself to believe.
I've read the bible, I've participated in bible study (more in-depth as a non-believer) and I've had lengthy discussions with people who hold firm beliefs in a god and the bible. I know much about the history of the Catholic Church, the Protestant Reformation, Martin Luther, Mother Teresa, the Pope, the Catholic Doctrine and countless other elements of Christian faith.
I, like most atheists, am an atheist because I have educated myself about the faith I was supposed to hold. We are not atheists because we didn't "know" our religion - we are atheists because we know and that knowledge is what made us non-believers.
It appears from the Pew study that people may simply hold their faith because they either don't know much about it (as the study shows) or that they have simply made up their own set of beliefs and have called them "Christian", "Jewish" or "Muslim". It makes me wonder if we'd have fewer religious people if they tried, first, to learn more about their religion.
The LA Times has an article on the study as well.
Update: Other blogs about this subject:
Friendly Atheist - How Ignorant About Religion Are Religious Americans?
PZ Myers - Want to know about religion? Go to your local atheist, not your priest.