Usually, I write both at the same time. Occassionally, I write the music first then later (sometimes, much later) the lyrics.Only once have I written words without an instrument handy. However, as I was writing the lyrics, I could hear the music (and knew the chords) in my head.
khandu