How was David righteous before God? Did David live a perfect life? Even the Godliest of God's people have only small beginning of obedience and are prone to fall and sin. We are declared righteous by God, through faith in Christ. David is no exception.