Shortly after publishing my first book, Fire, in 2010, I was surprised when people started to inquire if the protagonist's story was based on my own life. This came as a bit of a surprise to me. It never would've crossed my mind that people would assume that my books were autobiographical, but apparently, that was a common belief.
As it turns out, I didn't spend my 20s in a rock band, with two of my bandmates in love with me. I didn't become famous, and most of all, my life wasn't quite as exciting as that of my protagonist, Tarah. Although, my protagonist and I did indeed have similar physical traits (petit and blonde), and that's pretty well where our similarities ended. If anything, I was living vicariously through my characters while writing the book.
I would later write about vampires in The Rock Star of Vampires, and Her Name is Mariah, which seemed to end any speculation that my characters were representative of my own life. After all, I'm pretty sure no one thinks that I'm a vampire. Of course, if there had been any uncertainty, I'm sure that ended when I started writing the Hernandez series, which centers on a man who used to be in the Mexican cartel.
Then again, one never knows what people think.
In my opinion, it's never a great idea to write about your own life or that of others you know, even if the book is technically fiction. In the end, it becomes more autobiographical, and rather than following a character and telling their story, you're telling your own. I can understand why someone might want to do this, but I would warn that this brings things a little too close to home, making it more difficult to see both sides of a story. To write a good book, I think you have to show other perspectives, not just that of your protagonist. Also, you have to consider whether or not you want people to figure out it's about you. There are things you might not want to share and books, even fiction, are deeply personal when unraveling your characters.
That's not to say that it's always a terrible idea. If you decide to write about characters based on you, my advice would be to distance yourself to get a broader view. I would switch up some details just to make sure no one catches on. 😉