This psalm begins with a call to the whole earth to praise God, to acknowledge what God has done and has the power to do. An example of God's praise-deserving deeds is cited--providing a dry path through the sea for the Hebrews escaping slavery in Egypt and then continuing watchfulness and protection.
Past escape and even ongoing watch by God does not keep us from getting into trouble. Delivered from oppression into their own land, they faced temptation, had difficulties, underwent times of great trial.
And, as earlier in their history, God brought them through their difficulties.
We can imagine those exiles in Babylon reading the letter from Jeremiah and responding with singing this psalm. We can also imagine singing it in our own lives when we face our own particular difficulties in our own particular locations. As God has brought others out of their confinement, we can look forward to being brought out to a spacious place.