Write what you know. If you have never set foot on a boat, you may not want to write a song about being on the ocean. Writing about your own experiences communicates a sense of authenticity in your music. It's hard to communicate passionate feelings about something with which you are unfamiliar.
You don't have to have dramatic, unusual experiences to write about. On the contrary, your most ordinary thoughts, feelings and experiences can be the best material for songs because other people can relate to these commonly shared experiences.
Even if you write about your own experiences, you should write in a way that appeals to your audience, especially if you want to perform your song publicly or market it. Consider the interests of your audience in terms of your subject material, and consider your audience's vocabulary in terms of the lyrics.
If you want to write children's music, for example, you should use simple language and write about things that appeal to children. On the other hand, if you're trying to appeal to teenagers or adults, you will need a different approach in subject and lyrics.
Stimulate your creative abilities in order to write a good song. This can mean different things for different people. Some songwriters prefer to write in a quiet, solitary setting, whereas others prefer to be in the middle of noise and activity. Listen to different styles of music to expose yourself to various musical ideas. Visit places that inspire you, and talk to a wide variety of people. Get plenty of rest and eat a healthy diet so you have the energy you need to concentrate.
If you're going to write good songs, you will need to discipline yourself to write as much as possible. Set aside a time each day to focus on writing. Not everything you write will be a masterpiece, but increasing the quantity of your writing can increase your chance of stumbling upon a really good song every now and then.
Keep a notebook and pen or a pocket recorder with you for those times when inspiration strikes randomly. Even though you may have a set time for writing, a great idea might come to mind when you least expect it.