Saul and David both sinned in their life, but why God rejected Saul and chose David?
This is a question in my heart for a long time. Recently I got the answer. Because God looks at the heart! If you go through 1 Samuel and 2 Samuel and compare Saul and David, you will find David would repent deeply after he sinned and wanted to recovery the relationship with God eagerly. This can be known by Psalms written by David. But if we look at Saul(please refer to 1 Samuel 13:8-10, 1 Samuel 15:9-15), we will find his heart didn't belong to God, he despised God's words and even didn't treat God his own God. So after Samuel pointed his mistake, he said God is 'Your God' not his God(1 Samuel 15:21).
So we are human, we are not perfect, we always sin as this is our nature. But the heart is the most important. After sin, we should repent, should give our heart fully to God. God doesn't look at the behavior, just the heart.
Proverbs 4: 23 Above all else, guard your heart, for everything you do flows from it.