An unknown writer sought to motivate the Lord's redeemed people to praise Him by reviewing some of His mighty act.
God's people should thank Him because He is good and His loyal love endures forever. Those whom He has redeemed should be specially grateful for His liberating work for them and should publicly testify to His salvation. In view of verse 3 this psalm may date from the postexilic period of Israel's history (cf. vv. 10-16).
The writer cited four times when the Israelites cried out to God for deliverance and He saved them (vv. 6, 13, 19, 28; cf. Judg. 2:18; Joel 2:32; Acts. 2:21; Rom. 10:13). These situations were answers to the prayer Solomon prayed at the dedication of the temple (cf. 1 Kings 8:46-53). At the end of each section the psalmist reminded the redeemed to thank God with the same refrain (vv. 8, 15, 21, 31). The Gospels record Jesus affecting the same kinds of deliverance during His earthly ministry.
107:4-9 It is not possible to identify the specific occasion during the wilderness wanderings to which the writer referred here. The people were hungry and thirsty and cried out to Yahweh in their distress (cf. Matt. 14:13-21; 15:32-39). He delivered them and led them on safely to their destination. Consequently His people should thank Him for His loyal love and for His wonder inspiring works for them. Yahweh provided the basic necessities of life for His people.
107:10-16 Second, the Lord delivered his captive people when they cried out to Him (cf. Matt. 8:28-34; Luke 1:79; 4:18-19). God had set them free. He provided freedom for those held in captivity because of their sins. This is another clue that this psalm dates from after the Babylonian captivity. Perhaps this stanza inspired Charles Wesley to write "And Can It Be That I Should Gain?"
"Long my imprisoned spirit lay
Fast bound in sin and nature's night;
Thine eye diffused a quick'ning ray,
I woke, the dungeon flamed with light;
My chains fell off, my heart was free,
I rose, went forth, and followed Thee."
107:17-22 Third, when God's people were sick because of their sins and they cried out to Him, He restored them to health (cf. Matt. 9:1-8). The reference to God's Word having a part in their healing (v. 20) shows that spiritual nourishment plays a vital part in physical restoration (cf. Deut. 8:3; Matt. 4:4; James 5:14-16). Such salvation should move God's people to make sacrifices to express their gratitude and to tell other people about the Lord's goodness.
107:23-32 Fourth, God delivered sailors when they cried out to Him in storms. He calmed the seas and brought them safely to their ports (cf. Matt. 8:23-27; Luke 8:22-25). This too demands public praise from those saved.
The following verses contain a second major reason for praising God, namely His providential governing of the world.
107:33-38 God controls nature so that it becomes His instrument of cursing or blessing His people. The repetition of the phrase "an inhabited city"(v. 36, cf. vv. 4, 7) is a unique feature of this psalm. It may refer to the captives returning to Jerusalem, their long anticipated destination in the three returns from Babylon that the Old Testament records.
107:39-43 The Lord also controls the experiences of people. He humbles the proud, but He also exalts the humble. The godly observe this and rejoice, but the unrighteous keep silent. A wise person will reflect on these matters and meditate on God's loyal love (hesed).
This whole psalm exalts the loyal love of God (vv. 1, 8, 15, 21, 31). It teaches God's people to observe God's loyalty to them when He saves them after they call on Him. He does this providentially by controlling the forces of nature and by arranging the circumstances of their lives. The proper godly response to this grace is to give thanks to Him and to tell others about His wonderful works.