Being the final part of a series of plagues, God required that the Jewish people sacrifice lambs and apply blood to their doorposts in order that He pass by those houses and leave the firstborn children unharmed (Exodus 12:7; 12-13; 21-24; 27). The Pharaoh lost his firstborn son as the Lord cast judgement on Egypt.
This incident is illustrative of the imputation of Jesus Christ's righteousness to those who have placed their trust in Him. We have a righteous status credited to our account before God because we have been covered by the shed blood of His Son.
We are not under divine judgement, but forgiven of our sins. Just as the blood of the lambs was applied to the doors of the houses to spare the oppressed people of judgement, so the blood of Christ is applied to us by faith to enable access to God.