When it comes to state or religion, I say both institutions must burn.
I think it was Voltaire who said something along the lines of; We shall not be free, until the last King has been hung with the entrails of the last priest.
As you opined religion has been a source of great evil in our recent history, and a justification for blatant racism and xenophobia. From Martin Luther, to Joseph Smith, to Adolf Hitler, all of these people used religious justification for their horrific acts and thoughts.
Unfortunately, in a modern setting, religion is often benign, or at least has a benign face, which allows its proliferation through seemingly innocent rituals, and indoctrination of the young.
I have often wondered what would "kill god", and I think there are only 2 things which could do it.
Once we can upload our consciousnesses to a mainframe, rendering us practically immortal - Fear of death would slowly evaporate, and thus the need for a comforting afterlife.
Aliens landing on the planet and confirming that they had never heard of any of our gods, thus proving they were completely anthropomorphic.
Although, I think number 1 would have a more lasting effect :-)