David wrote this psalm at the end of his life. He encourages people not to allow their hearts to envy those who seem to be doing well, yet are pursuing sin and wickedness. He gives us one of the greatest keys to overcoming in life, namely that we should delight ourselves in the Lord.