"To do someone¨ can mean to have casual sex.
From the dialog, it appears that Frannie did not invite Monica to the wedding because Monica had had a sexual relationship with Frannie's fiancée. [former lovers are not normally welcome at a wedding ....]
The humor in this dialog depends on a double meaning of ¨know¨ somebody and the shift between ¨what you did¨ and ¨who you did.¨
Frannie: I believe you ¨know¨ my husband.
[intended meaning - you know him too well because you have had sex with him in the past]
Ross: So it's really a question of "who" could you possibly have done.
[intended meaning - Frannie is upset because of who you´ve had sex with.]