Three times in this section, Lot is called "righteous," and once he is called "godly." Yet, when we look at his story, found in Genesis 11 - 19, everything that is written about the man is negative. It is not good. He is not put in a good light at all, yet Peter calls him "righteous" and "godly."
It is even more shocking to consider Peter's obvious inference that he was righteous while all the evil, wicked things were happening in Sodom. From this, we can conclude that he did not become righteous through repentance and faith in Jesus Christ after the shock of events that occurred with the destruction of Sodom and Gomorrah, but that God deemed him righteous before that time and through the event. Lot, that righteous man, was troubled with what was occurring within the city.
Lot, then, was not what we would consider a bad or evil man. He was, in fact, what we would consider to be a converted man. He had received the grace of God, so righteousness was imputed to him, even as it is to us.
Peter writes that Lot was tormented by the things that he saw in Sodom and Gomorrah. What does this mean? It means that he clearly understood sin. It does not seem that the Sodomites were concerned at all, but Lot was. He understood that his neighbors were far off the mark.
However, though he was not wicked himself, he did nothing to remove himself from his evil situation. There is the problem. He lingered. He was willing to coexist with sin.
— John W. Ritenbaugh