Miss Prism: (Recoiling in indignant astonishment) Mr Worthing! I am unmarried!
Jack: Unmarried! I do not deny that is a serious blow. But after all, who has the right to cast a stone against one who has suffered? Cannot repentance wipe out an act of folly? Why should there be one law for men, and another for women? Mother, I forgive you. (Tries to embrace her again.)
The key part of this passage is that just prior to attempting to hug Miss Prism, Jack had confirmed that the handbag he was left in as a child belonged to her. Therefore he believes she is his mother. To Jack, this is a joyful reunion; to Miss Prism, however, this is an accusation against her character, since she is unmarried and therefore supposed to be a virgin.
When Miss Prism exclaims that she is unmarried, she means that it's impossible for her to be his mother, as a woman of her stature would never have sex outside of marriage. However Jack hears this as a confession that she has had sex outside of marriage, and hastily reassures her that he loves her anyway. The humour comes from the mismatch in how each character is reading the situation - Jack sees himself as being generous and progressive, but all he's doing is offending Miss Prism further by continuing to insist she had a child (him) out of wedlock.
As for his specific lines, "who has the right to cast a stone" refers to a Biblical passage (John 8:7) where Jesus speaks to a mob about to stone a woman for adultery, saying "Let he who is without sin cast the first stone." In other words, no one is innocent, so it's unfair to condemn someone else without acknowledging our own faults. Furthermore, the requirement of virginity is a double standard - no one expects men to stay virgins before marriage, as long as they're discreet ("one law for men, and another for women").