What does John 20:23 mean?
After being crucified and buried (John 19:30, 41–42), Jesus has appeared alive to His disciples (John 19:19–22). In this appearance, He has made multiple references to peace and breathed into them (Genesis 2:7) a partial indwelling of the Holy Spirit. When Jesus spoke to the disciples at the Last Supper, He closely connected the ideas of "peace" and the indwelling of the Holy Spirit (John 14:26–27), whose primary influence is convicting and reminding believers of truth (John 15:26; 16:13).It is this context which frames Jesus' remark about forgiveness: this declaration comes because these men are being reminded and guided by the Spirit of God. In no sense, at all, does Christ mean that forgiveness of sin is being determined by the disciples, or that they are choosing whether to absolve others of sin. The original Greek language uses more easily defined tenses, so it comes across more clearly, emphasizing that such sins "have already been forgiven" or "have already been retained." Guided by the truth of the Holy Spirit and in keeping with His truth, these men will be able to accurately declare whether others are abiding by those truths.
This follows in the same style as Jesus' previous instructions (Matthew 16:19; 18:18). It also parallels the Old Testament symbolism of God telling a prophet they would "do" certain things, while at the same time making it clear that the prophet's role was only to announce such things as God was doing (Jeremiah 9:1–10).