Psalm 37 is a Psalm that was written by David when he was an old man, v. 25. He addresses a problem that has plagued the people of God since the beginning of time. That problem is: Why do the wicked seem to prosper while the righteous suffer?

This problem is also addressed in Psalms 73 and 49.
It is also a prominent theme in the book of Job.