This psalm has evidently a definite historical background. Israel has been worsted in fight, but still continues its campaign against Edom. Meditating on God's promises, the psalmist anticipates victory, which will cover defeat and perfect partial successes, and seeks to breathe his own spirit of confidence into the ranks of his countrymen. But the circumstances answering to those required by the psalm are hard to find.
BookJonathan Edwards · Types of the Messiah · Proverbs 1:6
David was a great saviour. He saved Israel from Goliath, and the Philistines, and from all their enemies round about. 2 Sam. iii. 18. “The Lord hath spoken of David, saying, By the hand of my servant David will I save my people Israel out of the hand of the Philistines, and out of the hand of all their enemies”; agreeably to the prophecies of the Messiah. David was greatly persecuted, and his life sought unjustly; agreeably to prophecies of the Messiah.
SermonThomas Manton · Sermons on Psalm 119 · Psalm 119:121
But let us see how David expresseth his innocency, ‘I have done judgment and justice.’ These two words are often joined together in scripture. When God is spoken of, it is said of him, Ps. xxxiii. 5, ‘He loveth righteousness and judgment;’ and in the 2 Sam. viii. 15, it is said that ‘David executed judgment and justice over all Israel.’ Muis distinguished them thus, Judicium adversus sceleratos, justitia erga bonos—judgment in punishing the wicked, justice in rewarding the good.
SermonJohn Flavel · The Fountain of Life · John 20:17
Thirdly, Christ ascended munificently, shedding forth, abundantly, inestimable gifts upon his church at his ascension. As in the Roman triumphs they did spargere missilia, bestow their largesses upon the people: so did our Lord when he ascended; “wherefore he saith, when he ascended up on high, he led captivity captive; and gave gifts unto men.” The place to which the apostle refers, is Psal. 68: 17, 18. where you have both the triumph and munificence with which Christ went up excellently set forth together.
Psalm 89:14 Righteousness and justice are the foundation of Your throne; loving devotion and faithfulness go before You.
Amos 5:15 Hate evil and love good; establish justice in the gate. Perhaps the LORD, the God of Hosts, will be gracious to the remnant of Joseph.”
Psalm 72:2 May he judge Your people with righteousness and Your afflicted with justice.
2 Samuel 3:12 Then Abner sent messengers in his place to say to David, “To whom does the land belong? Make your covenant with me, and surely my hand will be with you to bring all Israel over to you.”
2 Samuel 5:5 In Hebron he reigned over Judah seven years and six months, and in Jerusalem he reigned thirty-three years over all Israel and Judah.
2 Samuel 23:3–4 The God of Israel spoke; the Rock of Israel said to me, ‘He who rules the people with justice, who rules in the fear of God, is like the light of the morning at sunrise of a cloudless dawn, the glistening after the rain…
1 Chronicles 18:14 Thus David reigned over all Israel and administered justice and righteousness for all his people:
Psalm 45:6–7 Your throne, O God, endures forever and ever, and justice is the scepter of Your kingdom. You have loved righteousness and hated wickedness; therefore God, your God, has anointed you above your companions with the oil…
Psalm 75:2 “When I choose a time, I will judge fairly.
Psalm 78:71–72 from tending the ewes He brought him to be shepherd of His people Jacob, of Israel His inheritance. So David shepherded them with integrity of heart and guided them with skillful hands.