Most of the psalm is devoted to describing the miracles God performed for Israel as they left Egypt and headed for Canaan. The key thought is that God went before His people, and everything in nature trembled at His presence and obeyed His will (v. 7). The Red Sea opened and Israel marched through on dry land. Forty years later, the Jordan River opened and the people of Israel marched into the Promised Land. During their long march, God gave them bread and meat to eat and water to drink. Two different Hebrew words are used for “rock” in verse 8; the first refers to Exodus 17:1–7 and the second (“flint cliff”) refers to Numbers 20:1–13, one at the beginning of their journey and the other near the end. It is likely that the mountains and hills mentioned in verses 4 and 6 were in Canaan, and the picture is that of God removing all obstacles from before Joshua and the victorious Jewish army. God goes before His people and takes them through the hopeless places (Red Sea, Jordan River) and the hard places (mountains, hills), and He even provides water out of rocks! (He can also provide honey, see 81:16. Sweetness out of hardness!)
The Lord is not mentioned by name until verse 7, and then the psalmist calls upon the whole world to tremble at His presence! The Exodus may have been past history, but the presence of the God of Jacob is a present reality to those who trust Christ and allow Him to lead (John 10:4). Remember that the Jews used this psalm in those difficult post-exilic days when the work was hard and the dangers were many. This vivid picture of God going before His people must have helped them grow in their faith and trust Him for their needs. It can also help us today. “If God be for us—and with us—and over us—and before us—who can be against us?”