The psalmist acknowledges that the Lord has “done good” or “treated him well” — though I think the psalmist is much less interested in “how” (well) God has treated him and more with “what” (good) God has done to him. Notice: “You have dealt well with your servant” (Ps 119:65).
Time for us to ponder the “good” (Hebrew tov) God has done us. A good time of the year for us to ponder the good God has done for us. And this psalmist knew bitter experience, but when he looks back over his life he sees the “good” God has done to him.
While it could be understood that the “good” is understanding the “word” as “Word” (119:65b), I find it more likely that the “good” is what God has done in such a way to remain faithful to His own word (as promise). So, “according” to your word means “as you have promised you would do me good in your promises.”
The psalmist prays for “good moral taste/judgment” (Hebrew taam) in 119:66 — along with good knowledge. We might ponder what we have a good taste for:
Many of us have good taste in food — we know the difference between a store-bought broth and home-made stock; some have good taste in cars — we know the strength of a well-made car; others have good tastes in clothing — they not only coordinate one article with another, they know what to wear and when and where to wear it. Others have good tastes in pens — we know Conklin from Conway Steward and Mont Blanc.
The psalmist may have had some of these tastes, but he wants good “moral” tastes. Once a friend told me that he no longer struggled with right from wrong but rather the better from the good. That is what the psalmist longs for: a taste for what is good, for what is wise, for what is the best judgment in particular situations.
The psalmist knows God is good and that everything that comes from him is good. Notice these:
God treats him with the good (119:65).
Teach me good taste (66).
God is good and beneficent (68).
The humble experiences of his life have even been good (71).
The law is gooder, that is, better than gold (72). [Same word in Hebrew.]
God is good; God therefore treats us with the good; we need to know the good; we learn the good; the Word is “gooder” than gold.
“It was good for me that I was humbled, so that I might learn Your laws” (119:71). Abraham learned this in Egypt; Moses learned this in the wilderness; neither Saul nor Solomon evidently did; David sure did. Josiah learned it well and he learned it young. Both Peter and Paul learned it — both the hard way.
Neither you nor I know specifically what the psalmist means specifically; and neither would most know what we meant by such references if we were to write down a few psalms of our own.
Maybe he learned this from the sufferings inflicted from those opposed to God’s ways. It seems he did.
If we focus our attention on the sufferings and humiliations of the psalmist, though, we’d miss the point. Had he wanted us to know what he suffered he would have told us. Instead, his whole point has direction: “so that I mgith learn Your laws.” He learned to do what God said — that is his point. He prayed to learn, and learn he did.
Those who learn from their mistakes the way God intends will focus a lot less on their mistakes and a lot more on what they learn: obedience, trust, love.