Many kinds of people came to the morning worship at the tabernacle and later at the temple. Some were poor and some were rich, some were oppressed by others, and some were the oppressors, some were working-class people, and some were aristocracy. With this variety in mind, it was a good time for David (or later worship leaders) to warn the aristocracy and to encourage the poor - to remind them all of their covenant relationship with God and of how that covenant relationship should work itself out in the practicalities of daily life.
This psalm is that that kind of reminder. It's a song of encouragement and advice for the poor and downtrodden who trust in the Lord, and it's a song of warning to their oppressors ("the wicked"). Hopefully, singing a song like this would prepare them to deal with people in the day that was before them.
The first thing the psalm does is to advise the godly not to become upset concerning those who don't care about the Lord, because, just as the green herb soon becomes brown and dies, these wicked will soon come to an end. But the faithful then hear themselves singing, "Trust in the Lord and do good; dwell in the land, and feed on His faithfulness." In other words they are to thankfully take what He gives them, and leave their problems to Him. The point is that if they're delighting themselves in God, then their desires will be good in His sight - and those desires will be realized!
Simply put, GOD will take care of them and of their affairs - so THEY won't have to! Justice WILL happen for them, and everyone will know it - it'll be as obvious as the light of the noonday sun! All they have to do is to be patient, wait for the Lord to take care of things, and not focus on how the ungodly seems to be prospering. Don't fret, he says, for "it only causes harm!"
The encouragement goes like this: "evildoers shall be cut off, but those who wait on the Lord, they shall inherit the earth!" The key to such encouragement is "waiting." Such waiting just amounts to awareness that there's an eternal plan that's been made in the unseen heaven, a plan in which God is laughing at the evildoer - whose weapons against the poor will finally be the means of their own destruction! The worshippers sing, "the sword shall enter their own heart, and their bows shall be broken."
So those who wait on the Lord need to remember that, "a little that a righteous man has is better than the riches of many wicked," because God is in control and will care for them, and "their inheritance shall be forever." The wicked, on the other hand, "shall perish, and the enemies of the Lord, like the splendor of the meadows, shall vanish - into smoke they shall vanish away!"
The daily lives of the godly and of the wicked are in great contrast: "the wicked borrows and doesn't repay, but the righteous shows mercy and gives." The result of this glaring contrast? "Those blessed by Him shall inherit the earth, but those cursed by Him shall be cut off!" The Lord never forgets the godly, but is always close at hand. It's always true that, "though he (the godly) fall, he shall not be utterly cast down; for the Lord upholds him with His hand."
As an added incentive to wait on the Lord, the leader sings and has the people repeat, "I have been young, and now am old; yet I have not seen the righteous forsaken, nor his descendants begging bread. He is ever merciful, and lends, and his descendants are blessed!" The righteous to whom the leader sings need only remember to "depart from evil, and do good . . . for the Lord loves justice, and does not forsake His saints; they are preserved forever . . . the righteous shall inherit the land, and dwell in it forever!"
The wicked don't believe it, but the righteous lifestyle of the godly is really the wisest way to live. The psalmist sings of that wisdom when he says, "the mouth of the righteous speaks wisdom, and his tongue talks of justice. The law of his God is in his heart; none of his steps shall slide."
The people sing the conclusion to these thoughts when they say, "Wait on the Lord, and keep His way, and He shall exalt you to inherit the land." Though the wicked are sometimes "in great power . . . spreading themselves like a native green tree," yet they're coming to their end because such self-made prosperity can't last under God's administration. The conclusion is that "the salvation of the righteous is from the Lord (not from themselves). The Lord shall help and deliver them . . . because they trust in Him."
We too need this daily wisdom. You and I need to be reminded that there's an unseen Hand in the world, an unseen but almighty Hand, the Hand of One Who laughs at the foolishness of the wicked, but a Hand Whose love upholds forever the one who trusts in Him. What we see with earthly eyes is not all there is. May God give us patient trust.