Hamlet did not want Claudius to go to heaven with a clean soul.
Hamlet decides that he was going to wait until he catches him committing another heinous crime, such as incest or heavy drinking. He wants him to go to Hell, but Hamlet is aware that if he kills him while he is praying, his sins will be forgived and he would go to heaven.