I've often thought about this. After looking at the life of numerous atheists, and having friends and acquaintances turn to atheism, the common factor seems to be some sort of ongoing sin in their lives. Of course, if it is true that the presence of such sin creates cognitive dissonance, or that the person merely wishes to escape from guilt, we might ask this question of not only atheists but also any who want to lessen the holiness and wrath of God toward sin (i.e., many liberals). I have often wondered if moves from a more conservative stance to a more liberal one (whether partial unbelief as in liberal Christianity or total unbelief as in agnosticism or atheism) is primarily an attempt to make our rebellion more acceptable and palatable to ourselves and others. We all, conservatives, liberals, atheists, etc. have sin in our lives that we must address.
Conservatives believe that God is holy and angry with sin, and hence, will judge it. Christ died precisely because God's just anger toward evil had to be appeased. Hence, we must confess our sins before God and be cleansed by the blood of Christ, having no righteousness of our own (hence, the biblical understanding of God and sin is preserved). Liberals believe that sins are not ideal, but God just wants us to do well, and His grace accounts for what is not ideal. He's not out there to judge us or punish us for it (hence, the God of the Bible is undermined in order to deal with sin). Atheists believe there is no God, and hence, there is no sin (getting rid of God altogether so that there is no one to whom we are accountable, and sin is merely other people seeking your conformity to their views).
In any case, here is a book about this very subject concerning atheism. As I said above, I might clarify this to be the case for apostasy toward more liberal stances rather than identify every case of atheism or religious liberalism as a case of lessening the guilt for ongoing sin.