This depends on the genre of writing I am using. I've written several personal essays, which of course, are based on events or people in my life. In my fiction writing, things differ. I don't want family or friends to recognize themselves as a character, and I don't want to make anyone think a mean or evil character is based on my acquaintanceship with them.
In thinking about this topic, I decided it would be very difficult not to have my life events play in some way in my writing. We all learn how to communicate and get along with members of our family and community and also how to disagree, and that learning can differ significantly. What I have learned and experienced must show in my writing. It is probably why I've heard writing exposes the author as a person.
I doubt specific events of my life have appeared in my stories, except maybe in very changed and convoluted forms. I've written mostly science fiction or fantasy romance, so most of my challenges and defeats would probably not work. However, my knowledge of art and history and experience with horses, riding, pets of all types, gardening, nature, and environment, have played into many of my stories, including my limited knowledge of sailing and other incidental knowledge. Throughout history, I have learned about certain types of events and how people reacted in the past, plus all the horrific things people have done to others they think of as invaders or miscreants, and I think the crime seldom deserved the punishment. I also think real-life situations portrayed in the news such as youngsters disappearing from home to other local catastrophes might enter my writing, but of course in a different way from the news presentations.
While the news describes many disastrous situations happening worldwide, from weather such as flooding, wildfires, droughts and various types of storms, to people instigated tragedies like uprisings and government reactions, I have not experienced them. I might use something like them in the future, but I know I would have to do extensive research to make the situations feel real to the reader. Politics, as exposed both in history and current media, have entered my stories, but in strange worlds and places, politics is often important.
Please visit the following authors' blogs and read their takes on this topic:
Dr. Bob Rich