Psalm 1:1-2
Blessed is the man who does not walk in the counsel of the wicked (following their advice and example). Nor stand in the path of sinners, nor sit (down to rest) in the seat of scoffers. But his delight is in the law of the Lord, and on His law, he meditates day and night.
God gives us a clear path to follow that keeps us away from sin. When we transgress by following along with people who have turned away from God we lose our blessing. We are to practice our faith and meditate on the word. When will fill up with all that is good in the word, we leave no room for sin to enter.