Then when he says, And such were some of you, he shows how they escaped from the above-mentioned danger. First, he reminds them of their past state, saying: And such were some of you, namely, fornicators and idolaters, etc. He makes particular mention of these vices, because they abounded in them, as it says in Eph (5:8): "For once you were darkness, but now you are light in the Lord."
Secondly, he shows how they were freed of them inwardly, saying: But you were washed by the power of Christ's blood in baptism, as it says in Rev (1:5): "He freed us from our sins in his blood." You were sancti...fied by the power of Christ's blood and consecrated in grace, as it says in Heb (13:12): "So Jesus also suffered outside the gate, in order to sanctify the people through his own blood"; you were justified, i.e., raised to the state of justice, according to Rom (8:30): "Those whom he called he also justified."
Then he mentions the cause of these blessings: first, on the part of the humanity of Christ when he says: In the name of the Lord Jesus Christ, i.e., in believing and calling on that name, as it says in Acts (4:12): "There is no other name under heaven given among men by which they must be saved." Secondly, on the part of the divinity when he adds: and in the Spirit of our God, as it says in Ez (37:14): "Behold, I shall cause breath to enter you and you shall live." Therefore, since you have been freed by such great power, you should not return to the same former ways.
Source: Commentary on 1 Corinthians