So you're writing a story. Maybe you're pretty far through it already. There are a few female characters in the periphery, but mostly you write male characters. Later on, you decide the next section needs to be told from the perspective of the Prospective Girlfriend; in horror you realize that you have no idea how to write women. At least, not really.
You see, writing a male character is quite easy; even female authors can quite easily approximate how a man's mind works. Just look at the male characters in something by J.K. Rowling, Harper Lee, Diana Wynn Jones or countless other female authors. The reason it's so easy is because men's minds are simply constructed when compared to the mind of a woman. I'm not trying to make a “men are dumb” or “women are smart” argument; I don't want to seem like a sexist from either side. I'm just trying to make a few observations.
In a work of writing, male minds make a good baseline for how a person thinks, or at least how a person thinks they think. Just imagine a goal, then imagine the path of least resistance to get there. The male mind is this path. If and when women try to achieve the same goal, they might go about it a different way. I find myself thinking of my baby nieces and nephews. Talk about a detailed study in the difference in male and female brains.
Girls are crafty.
Some authors write women as if they're some kind of mythical, rules-of-nature-bending beast. Their characters' minds don't seem to follow any kind of logic, because the male writer doesn't actually know many women. The female characters' actions are erratic. They're either super sexualized, annoyingly macho or disgustingly demure. Either that or the author just writes his version of the Perfect Woman™, which brings its own problems. This is to say nothing of the awful, stilted dialogue.
This isn't to say that male authors can't write women. C.S. Lewis knew what he was doing, and actually made a point of getting into the female mind and poking around a bit, resulting in female characters more believable than girl characters written by actual girls.
There's no magic formula one can use to determine the proper woman. Most of it comes down to experience. If you've known many, many women in your life, you're probably going to have a better understanding of them than a shut-in who plays World of Warcraft all year (not that there's anything wrong with that).
Again, this falls into the Writing What You Know category. More specifically, it falls into a subcategory called Not Writing What You Don't Know. This is INCREDIBLY important when it comes to romance. Good grief, don't write romance if you've never kissed a person before. Please, please spare us. This one particular reason that I can't stand romance novels: They're often written by a person who hasn't done the things they're writing about; they're written by a person who has heavily imagined what it must be like to do those things.
Now, I'm not saying you should stay away from writing women completely. As minor characters they can be good for a laugh (especially when the author knows what they're talking about), or some colorful exposition. In fact, I recommend reading as many books as you can that are written by women. This shouldn't be hard, as there are tons. As you could probably tell, my recommendations are Harry Potter and anything by Diana Wynn Jones. On a side note, if you have something signed by her, I recommend you hang onto it, because I don't think she'll live to see 2011, sadly.
Who knows, you might actually succeed when you try to write women. Remember, though, that just because you happen to be a woman, this doesn't mean that you automatically know how to write them. My, that's weird.
Here's the most important part of this entry. Women are just people. They are not mythical, they are not unknowable. They're just like everyone else, except they're craftier and they smell nicer.
Male writers everywhere, stop writing them like they're a three-headed Hydra!