We have memory lapses such that we may need a reminder to bring a particular event back to our minds. That is due to our finiteness. Given God’s omniscience and omnipotence, he never suffers from a memory lapse (though to us it may seem as if God has forgotten something). In point of fact, in relation to God the term “remember” in the Bible catches the notion that God acts on a given piece of information (Genesis 8:1). In the present verse, to say that “God has remembered her iniquities” is to say that he now acts upon Babylon's iniquities so as to punish her according to promises made earlier. Though slow to anger and abundant in mercy, he has had enough of Babylon throwing her adulteries in God’s face and now responds in righteous jealousy. See Psalm 137:8, also Revelation 16:19.
5 for her sins are heaped high as heaven, and God has remembered her iniquities.