Just as it is forbidden for men to entertain sinful thoughts – imagining themselves committing adultery, or (even worse) planning it – it is forbidden for women to entertain sinful thoughts, that is, to imagine themselves committing adultery or being intimate with another man, and certainly to plan such an encounter. The verse says, “Do not follow your heart and your eyes, after which you are led astray” (Bamidbar 15:39). “‘After your eyes’ refers to sinful thoughts” (Berakhot 12b). As Sefer Ha-ḥinukh points out (§387), this mitzva applies “at all times and in all places, to both men and women.” It states elsewhere: “Women, too, are forbidden to think about any man other than their husbands. All their desire and longing should be directed toward them. This is how upright Jewish women behave” (ibid. §188).
In addition to causing a woman to have less love for her husband and contaminating her mind, thinking sinful thoughts can lead to actual adultery. This is the method of the evil inclination: first it arouses thoughts, then it draws people closer to sin, and ultimately it traps them in its net, causing them to commit adultery and thus ruin their lives. In this respect, men and women are the same.
As we explained above (section 6), for men there is another category of sinful thoughts, namely, those that cause an erection and can lead to a nocturnal emission. A man may not even think about his wife in an arousing way while she is a nidda. For women, though, there is no such concern. Therefore, a woman may think about sexual matters, as long as these thoughts are not about sinful behavior. Likewise, she may think sexual thoughts about her husband while she is a nidda.