How to understand John 15:22?
"but now they have no excuse for their sin."–verse 22
Who are "they"?
Jesus is speaking about those who had seen his miracles and heard his teachings.
What is "their sin"?
A cross-reference scripture at Matt. 11:21 helps us to see that their rejecting Jesus and his teachings are tantamount to sinning without repentance.
"they would not be guilty of sin;"–verse 24
How could they "not be guilty of sin"?
The sin, in this case, is their seeking to kill Jesus. John 11:47 shows that the religious leaders were beginning to despise Jesus for his teachings.
At Rom. 3:23, Paul clearly tells us that "all have sinned and fall short of the glory of God". So even those that had rejected and sought to kill Jesus still have sin. We all need Jesus' sacrifice for salvation.
"By means of him we have the release by ransom through the blood of that one, yes, the forgiveness of our trespasses, according to the riches of his undeserved kindness."–Eph. 1:7 (NWT)
So if "they" had never heard of Jesus, then they would not have the opportunity for redemption and salvation. Their rejection of him is another matter entirely.