When God created man, man had righteousness which gave him legal right to come to Him.

...............Man gave up these rights when he gave them to Satan [sinned] and he was left without hope and without God.