From the three examples given (vv. 4-8), the apostle draws the unquestionable conclusion that the Lord, according to the context God the Father in verse 4, knows how to deal with the pious and the ungodly. This means He has both the power and the skill.
He knows how to deliver, or free, the pious, that is, all who honor God and do what is pleasing to Him, from temptations, sorrows, and afflictions. By these, as gold by fire, their faith and virtue are tested (cf. 1 Pet 1:6; 2:12; Jas 1:2 and following, and note).
He knows how to keep the lawless, who do not act according to God’s law and commandments, and therefore transgress God’s law, until the day of the last judgment for punishment. They will undergo this for lawlessness and sins in general, like the fallen angels.
Read more (138 words)
“The apostle proves by examples that punishment comes for sins and reward for righteousness. The apostle speaks as if saying: God knows how inevitably to punish without mercy those who live in sins, as He punished the angels who sinned, the people before the flood, and the cities of Sodom.
He knows how to reward those who practice righteousness, as He rewarded Noah and Lot. The course of the speech is this: it has been said that false teachers will be punished for their blasphemies and corrupt life.
Examples are presented: God did not spare the angels who sinned, and He did not spare the first world. Then those who struggled in righteousness are mentioned. It is said that God preserved both Noah and Lot, for their chastity, from the destruction of the people contemporary with them” (Theophylact).