These final two verses of 1 Peter 2 are very encouraging, and present the message of the gospel in a nutshell: We were sinners, and the sacrifice of Christ restored us into a right relationship with God.
You can see this passage for yourself in 1 Peter 2:24-25.
Peter gives his readers, both those who were his contemporaries as well as later readers, some very encouraging words as he finishes up this section of suffering unjustly. Remember, this is in the context of submission, and more specifically, his instructions to those who were slaves. He gives the ultimate example for them in the suffering of Jesus Christ. And although this was written to slaves, the principles hold true for any of us.
Jesus is the example that we should follow. And what Jesus accomplished through his unjust suffering restored us into a relationship with our Creator. What could be more encouraging than that?
Peter finishes this section with a look at the death of Christ, which he willingly experienced in order to make us righteous. He presents the message of the gospel as simply and succinctly as it can be presented: Christ bore our sins on the cross. He died for those sins, in order to make me righteous. That’s good news!