Answer:
Claudius wanted the crown, wanted Queen Gertrude as his own, and sought to fulfill his own ambition through his violent acts. He isn't sure if he can be forgiven of his sins because he is unwilling to give up any of these things. Therefore, he feels that he can't truly repent (which is to turn away from sin and head in a different direction) and that his heart is "black as death."
Nevertheless, Claudius drops to his knees to pray, hoping that "all may be well." Watching from a distance, Hamlet knows that he has his answer but can't kill him in an act of prayer, believing that doing so would send his father's murderer straight to Heaven.