Hint: it's NOT just about a happy marriage.
Try a little book shopping and you'll find dozens, maybe even hundreds, of books about how to detect, prevent, punish, and recover from infidelity. "Treating" infidelity has become a BIG business, both in and out of couples therapy.
There's even a regular convention that focuses on all the books, counseling groups and marketing groups that make money off infidelity.
Surprisingly, both research and anecdotal data shows that infidelity does NOT usually happen because of problems in a marriage. I've even seen women who argue backwards, saying, "There must be something wrong in my relationship, otherwise why would I have cheated?" But, when I look at female infidelity, I find that marital distress is very rarely a reason for wives who pursue extramarital sex.
So what is?
Here are the 6 main causes of female infidelity I have found in my work.
1. The sexual peak imbalance.
An oft-cited statistic is that men reach their sexual peak at 18, and women at thirty. So by the time a woman's sexual engine is really revving up, her husband's engine is already starting to run out of gas. Mark Twain even referred to this as God's jest. But, there's no real evidence that this is in fact true. Certainly there is no biological data supporting this.
I think that this myth has more to do with the fact that, in our society, young women have not traditionally been taught to embrace their sexuality as young men are taught to do. It often takes a few years of adult independence and maturity, and perhaps sexuality within a marriage, before women feel comfortable and safe enough to begin asserting and exploring their sexual needs.
2. The evolutionary instinct to have a "back-up plan." 
The only place there is some evidence of a female sexual peak later in life is that there is a spike of female infidelity in the late thirties and forties, particularly as a woman reaches the end of her reproductive years. Evolutionary researchers have suggested that this might reflect women pursuing a "backup plan," or another man to care for them and with whom they can have children if their current mate abandons them.
I don't know about this argument — for instance, in my book, I talk about a Roman tradition where men who had had multiple children with their wives sometimes loaned her to other childless men, so that she could bear them children. I'm just not sure that in humans the male desire to obsessively and jealously procreate is as strong as some theorists suggest. I also believe these same women are likely reaching a point of economic independence from their own careers and finances — a factor that strongly predicts female infidelity.
3. The need to feel attractive.
If there is any reason for female infidelity I have heard and seen the most, it is the woman's experiencing appreciation of her attractiveness from men other than her husband. One woman told me, "Of course my husband thinks I'm beautiful, he's supposed to. Or at least supposed to say that he does. But when a man I don't know thinks I'm beautiful? That sends a tingle down my spine."
In so many marriages, relationships settle into a domestic comfort, as the exciting neurochemicals of the early stages of a relationship begin to subside. Sadly, one of the things that often subsides with it is the degree to which husbands and wives offer each other the vocal praise and admiration they gave each other early on. Couples stop talking about the things they appreciate and love about one another. Even worse, when they do talk, it is mostly about the things that aren't working so well — finances, children, in-laws, etc. So, when a woman starts being tempted by another man, it's often because when she's with him, she feels beautiful, sexy, and desired.
4. The desire for a self-confirmation of personal freedom. 
Even as societies become more sexually equal, women continue to face tremendous pressures of conformity and huge burdens of responsibility. An Indian woman offered the following comment. Frankly, I think she describes this better than I could:
"I am a middle-class Indian woman who had an arranged marriage — one that is not particularly satisfying. I have realized that respectable middle-class Indian society will give me the opportunity and the space to be unfaithful, as long as I am discrete and keep up the appearance of being a chaste, devoted wife. Living as I do in a society that doesn't offer women a lot of validation outside of marriage and motherhood, and which gives husbands a disproportionate amount of authority over wives, I find that being unfaithful is often the only way I can reclaim a little bit of my personhood. For a few hours, I can be a free being, not just someone's wife and daughter-in-law. I wonder if there are other women like me, particularly in traditional, patriarchal societies like India's, for whom infidelity is often a means of finding autonomous self-expression."
5. Revenge. 
Sadly, many women enter into infidelity, seeking to redress wrongs they feel from their husbands. Plain and simple.
6. An innate attraction to "the stranger."
In studies of the sexual behavior of primates, it's been found that females will often seize the opportunity to mate with a male of another troop or group. In contrast to theories that females are selective of their sexual partners, seeking out "the best," some findings suggest that females may actually prefer variety and diversity.
One evolutionary explanation is that this increases the genetic diversity of the child. In humans, studies of the major histocompatibility complex (MHC), which governs the development of the immune system, it's been found that women who are married to men whose MHC is too similar to their own are prone to be sexually unfaithful (or at least tempted) around their ovulation. And they are more tempted by men whose MHC is different.
Interestingly enough, and to bring this all back around to where I started, the MHC variables did not predict relationship satisfaction. Despite the temptations or incidents of cheating, the marriages examined were happy and healthy.