In an interview, Billy Joel said he subscribes to the Rolling Stones (Keith Richards?) theory that the phenomes of the words are dictated by the melody line. Take the song “Honky Tonk Women,” with the very long multi-measure note in the chorus:
Hooooo-ooooo-ooooooo-ooonky tonk women,
Give me, give me, give me, the honky tonk blues.
According to the theory—and because Billy writes the music first—you couldn’t put a word like “girl” in that melody, because you’re holding the wrong kind of sound:
Girrrrrrr-rrrrrr-rrrrrrrrrrrrrrr-rrrrrrlll…
It doesn’t ring. Or the name “Fred.” I’m sure you get the idea.
Still, I have written music in all kinds of ways, with the help of my brother (who likes to scribble together lyrics now and again). Often this will be in the form of partial lyrics that my brother hands me. I’ll knock together the first verse and chorus (in full arrangement) on a MIDI keyboard and let him listen to the “sound” that I imagined. After having heard the “sound” of the song and the meter I am using for his first verse, he goes away and writes more lyrics that fit the rhythm and tone.
Sometimes I will write a musical hook but have no lyrical direction to it. I’ll send him the music and let him fiddle with it. The sound of the piece sometimes inspires.
Sometimes I write some lyrics myself and put them to music. Or I’ll write lyrics and give them to him to put together a chord progression and a few snatches of the melody. I’ll take it back and work up the arrangement ('cos I’m the one with the keyboards).
Finally, I sometimes write the first verse and chorus and hand them to my brother and ask him if he can think of additional lyrics to fill the thing out.
In short, there’s no one way, but since we often write as a team, it’s hard to make generalizations about other artists, especially solo act singer-songwriters.