Deut 22:13–21 says that if a man marries a virgin, is intimate with her, and then claims that she is not a virgin, and there is no evidence that she is a virgin, that she is stoned. That seems to be essentially taking the man's word that he didn't do anything, and anyway on the surface that seems extreme. So what are the exact conditions for this to happen?
In ancient times, the two stages of effectuating a marriage were separate (Qiddushin/Nissuin). The first stage Qiddushin - it is often translated as "betrothal" however it is of greater significance than the English word connotes. Once Qiddushin has taken place, the couple are fully married - they simply have not yet been intimate with one another (this takes place after Nissuin). The case under consideration is where it is suspected that the wife has had an adulterous relationship once Qiddushin has already taken place and prior to the Nissuin. In order to be liable for capital punishment there would need to be witnesses testifying that they witnessed her commit the adulterous act.