A Twitter message noted — apparently referring to the law in India —

Strangely, it is illegal for men to commit adultery with married women, but legal with unmarried ones.

I can’t speak with confidence about India, but if the law is based on English law, then part of the reason is tied to why “adultery” is called “adultery.”

“Adultery” apparently comes from the same root as “adulterate.” A married woman who has sex with someone other than her husband risks getting pregnant and giving birth to a child who is not her husband’s but might be raised as her husband’s — thus adulterating the husband’s blood line. In the words of Bacon’s Abridgment (1736),

Fornication and all other Lusts are unlawful, because Children are begotten without any Care or Preparation for their Education; and the Crime of Adultery receives this further Aggravation, that it not only intails a spurious Race [here, meaning offspring and their descendants -EV] on the Party, for whom he is under no Obligation to provide, but likewise destroys that Peace and mutual Endearment which ought always to subsist in the Marriage State.

Likewise, State v. Lash (N.J. 1838) cited Bacon’s Abridgment, and elaborated on it thus (paragraph breaks added):

This is the circumstance on which adultery depends at the common law; its tendency to adulterate the issue of an innocent husband, and to turn the inheritance away from his own blood, to that of a stranger. If the woman be single, her incontinence produces none of this evil; her issue takes away no man’s inheritance; it can be heir to nobody, and the burthen of its support, is cast by law upon herself and the partner of her guilt. Even if her paramour be a married man, it is not adultery, for the same reason; the bastard cannot succeed to his inheritance, neither does it adulterate the issue of his wife; it can never succeed to her inheritance in case she leaves any to descend. She may adulterate her husband’s issue; the law cannot defend him against her; his only reliance is on her virtue; but he can never adulterate hers.
This is the reason why a married woman, if her husband become unfaithful, cannot maintain an action of adultery against him or his paramour, in any of the common law Courts; such infidelity does not adulterate her issue, nor his own; it brings no ones inheritance into jeopardy, nor can it possibly produce a spurious heir to disturb the descent of real estates. If she wishes it to be treated as adultery in her husband, she must sue him by a short petition to the Court of Chancery, which, governed by the Ecclesiastical law, allows adultery to consist in the breach of marriage vows; and there she may have a decree of divorce and allowance of alimony.

Now of course the careful reader will have noticed that Bacon’s Abridgment is not limited to the “adulteration of the blood line” argument, but also notes the destruction of marital peace stemming from the breach of the marriage compact — a destruction that can stem from the husband’s affair with an unmarried woman as much as from a wife’s affair. One can certainly imagine the law focusing on this, and treating a married man’s affair the same as a married woman’s; and indeed canon law and later English ecclesiastical law did seem to treat the two the same. And of course it’s possible that the real motivation for the married-women-only rule is that judges were generally more concerned about protecting husbands than protecting wives, even setting aside the special risk to the husband of having his property go to a child who turns out not to be his biological offspring. But whatever was going on behind the scenes, the rationale given for the “married woman” limitation on adultery law was a concern about adulteration of the blood line.

This may also explain, I think, why some state laws have treated oral sex as not being adultery.

UPDATE: I should have made explicit that this is the historical definition of adultery, but not the current definition in the U.S. Under modern Equal Protection Clause jurisprudence, any adultery laws (or their civil analogs, the torts of criminal conversation and alienation of affections, in the few states that recognize them) have to be gender-neutral.