There are many things that can trigger a writers creative part of their mind. A story, a mood, a life event, etc. The one thing that a writer shouldn’t do is write because of a person. Every artist has their muse for any type of art but writers should never write because of a person. It doesn’t matter if it is good or bad writing you shouldn’t do it because of it. I have someone that makes me very happy, however things went south and we stopped talking for a while. Had I been writing for him or because of him I wouldn’t have been able to continue writing when he was gone. We are talking again and he does mean a lot, I know its easier to write when your happy. But you need to remember that the keys, pencils, paper, will always be there when you need them. Writing has helped me through some of the hardest/darkest times in my life. It has helped me through pain, health issues, death of close people. I know what its like to have no one but your thoughts. Thoughts that can burn a hole in your mind if you let them continue to circulate.
The reason that you should write is strictly for you. If you do that then no one can EVER take it away from you or ruin it. It will always be something that is 100% truly yours.