Which comes first, and which is harder?
Melody or lyrics?
Yes. Both. One, not other. Other, not one.
I sometimes find an interesting sequence of chords, or a riff, or a straight out instrumental melody, while mucking about on an instrument (usually guitar, sometimes not). It might turn into a whole song structure of possible verses, choruses, bridges, codas, etc. I may then decide to write some lyrics, or it may go on the backburner to be married up later with the next possibility:
Sometimes I come up with lyrics, usually some sort of story-based song, without ever touching an instrument until they are "done". If I don't have music on a backburner that works, I may then come up with some basic chords or a melody. It may get fully developed, or may be still a bit rough around the edges.
Sometimes, while writing lyrics, I hear a melody or chord structure right away, and they both develop concurrently (well, stops and starts back and forth). And sometimes vice versa.
In all of those above cases, I will sometimes take it to the band for some further ideas or tweaks, or I might just keep it completely as I wrote it if I think it is solid enough. But usually the band has some great ideas.
Sometimes I have an initial riff, take it to the band, and we develop more music, or an initial lyric, and off we go as a group songwriting session. Those are usually quite fun and satisfying. Sometimes someone else comes up with the riff or chords, and that triggers a writing session.
Sometimes someone has some lyrical ideas scratched together, and asks me, or the band, to develop chords, which leads to a melody, which leads to a group songwriting effort.
Anecdote to illustrate:
Recently the band was working to outline music for a project we are co-developing with another couple of musicians from another band - a musical play (we are all over the place). We realized one "scene" needed a song. So while I was transcribing some notes, and some others were discussing some other points of concern, one of the band members (from my band) sat there quietly and wrote the lyrics for a song in about three minutes.
After presenting the lyrics (which were spot on for the scene), we had him sing through how he might think the melody goes. Two of us from my band got guitars and played along, mixing chords and melody lines to accompany and mimic his singing, and we developed the chords and melody. We ran through it a few times, suggesting tweaks to his melody lines and the chords ("go higher at the end of that verse", "hold that note longer, then go low in the next line", "that needs something like an A, but not a regular A, maybe A7?" etc). We then did a quick recording in the home studio. We had that basic track down about 45 min after he started writing.
Apparently, not everyone works like that - the members from the other band just sat in awe as the frenzy of a Hard To Port songwriting session swirled around them.
And we don't always work like that. But when we do, it is awesome!