In her book Writing Alone and With Others, Pat Schneider discusses a notion that sometimes, in order to fix the writing, we have to fix the author. She presents the example of a doctor who was quietly sexist in his writing - the male characters were bold and dominant and Doctor, and the female characters were meek and willing and on First Name Basis Only (I am simplifying this example - Pat describes the situation much better).
As I write and as I grade the writing of my own students, I'm coming to realize how greatly our personal biases affect our work. Often, these biases are so deeply ingrained that, as writers, we don't realize our own writing is flawed. For me, the toughest bias to overcome is the one regarding parents. When I write stories, the parents of my protagonists never come out well. I could discuss potential reasons why over the course of pages, but I know the fundamental cause: I have unresolved issues with my own parents, areas of my life that I am unwilling to discuss with those closest to me. Oftentimes, I turn to fiction as an outlet, thinking that I can "write my way" to inner peace.
Unfortunately, life is not so simple. Stories are not born in peace (not if you want good conflict, they aren't). The stories I write to come to terms with my own personal difficulties sometimes reinforce my biases. The parents I write about turn out to be flat, and the children are little better. Rather than crafting a poignant piece about parents and children discovering common ground, I often dig trenches of ignorance between between my characters. And it's not that trenches of ignorance don't exist in real life (they do), it's that literature is meant to reveal something deeper. As writers, our goal should be to get to heart of our characters, even the ones who are not nice and pleasant or even decent.
Of course, I'm making it sound as if only the people we don't like or understand are hard to write about. All true characters are hard to write. I'd love to go on and say that we should never "write about" our characters, that we should instead "write" them, as they are. This is of course hard. This requires an acute empathy not just for other people, but for ourselves, for our own inner struggles. It requires, on the one hand, an intimate personal understanding of the characters. On the other hand, we must let go of our sympathy to reveal the deepest, darkest facts about these characters. I've heard this described as "writing with empathy but without sympathy" (and I'm afraid I don't know who to attribute this to - I think I heard it in an interview on NPR).