BBC: Genesis 15:12-16
As the sun was setting, Abram fell into a deep sleep, and a thick and dreadful darkness came over him. Then the Lord said to him, “Know for certain that for four hundred years your descendants will be strangers in a country not their own and that they will be enslaved and mistreated there. But I will punish the nation they serve as slaves, and afterward they will come out with great possessions. You, however, will go to your ancestors in peace and be buried at a good old age. In the fourth generation your descendants will come back here, for the sin of the Amorites has not yet reached its full measure.” – Genesis 15:12-16
Multiple symbolic events occur in the conclusion of this covenant making with Abram that it is fitting to focus on each of them briefly. Adam too was put into a deep sleep in the creation of his wife (Gen 2:21). This event ultimately looks forward to the burial of Jesus Christ and the resurrection of His body which is the church (John 11:25; Eph 1:22-23).
Likewise, the “darkness” that falls upon Abram is found repeated when Moses ascends Mount Sinai to talk and commune with God (Exo 20:21). This darkness falling upon Abram is not wicked but is in fact the special presence of God. This is especially crucial given the words that Lord actually speaks. The symbolism of forty years times ten (four hundred) rings to the fullness of the preparation of Israel in Egypt to brought into the Promised Land. And yet still, God in His grace for the faithful Abraham promises after the “third and fourth generation” (Exo 20:5; 34:7; Num 14:18; Deut 5:9) that they will be redeemed.
It is my opinion that the Lord is assuring Abram that though his offspring will be rightly punished for apostasy in Egypt (Lev 17:7; Josh 24:14; Eze 20:6-9), they will be blessed with salvation as the Lord remembers His people (Exo 2:24-25).