About half of the children living in the United States will see their parents go through divorce. I am part of that population growing up with a split household, my father and mother split when I was born and then currently my mother and step father are divorcing.
How do divorces affect the children of the couple? I looked at a paper published by the University of New Hampshire that dove into this issue.
Impacts on children from divorce depend on the age of the child when divorced, gender, amount of conflict between parents, and their support system. The affects are most prominent from pre-school aged to adolescents. For all ages, depression, aggressiveness, grief, fault, resentment, and loneliness are typical effects. Preschoolers believe they have caused the divorce and may show baby-like behavior as a coping method. School aged children take it harder, possibly because they may understand the conflict. They tend to hope they reunite and feel rejected. Teenagers feel pushed into adulthood, may take over or control family to fill in shoes, doubt their own relationships, feel pressured to choose a parent, fault one, and understanding the issue may interfere with their coping ability.
Additionally, the gender of the child and which parent raises them can have some repercussions. Generally, it's best for the same sex parent to raise the child. With this model, boys show less aggression and have less emotional problems and girls can become more responsible and mature.

Hopefully one day there can be less divorces and happier children worldwide.
Temke, Mary. "The Affects of Divorce on Children." University of New Hampshire Cooperative Extension, May 2006. Web. 19 Mar. 2012.
I've never heard of the concept that children are better off being raised by a parent of the same sex when a divorce occurs. Many factors do come into play of course. For example, the parent who has more time to raise a child might be considered more fit. If one parent is immature and the other isn't, that could also affect the child. While a child could probably relate more to a parent of the same sex, one must remember that there are other factors in making the decision of who should raise a child.