Writing songs is usually a personal process. What works for you may not work for others, which is why most composers write their song
Writing songs is the process of discovering sound, melody, and lyrics that harmoniously complement each other. With this in mind, here are 10 tips on composing music:

Songwriting – How to Easily Write a Strong Melody

Great melodies are crucial to great songs. This video will show you how you can easily come up with a solid, memorable melody. you’ll learn an easy technique for writing effective, singable melodies your listeners will be singing, even after your song is over.

Some of the things that I found very useful for songwriting is the use of a musical motif. A motif a short musical phase that is used as a foundation for a melody. For a motif to work it must be repeated several time in the song section. In the video Anthony creates a musical phase based on the motif. The phase is then altered and modified to create some variations.