I had a moment like that. I rejected biblical stories as soon as I heard them - around 5 years old - but accepted God. To complicate things further, I sucked up science like a sponge. I was about 12 years old when I was trying to reconcile God with science and the obvious fictional nature of the bible when the possibility of there not being a God popped into my head. It was like you described - flipping a switch. The moment I contemplated the possibility of atheism, I was an atheist.
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.
Albert Einstein
Albert Einstein