Lyrics come from the head and music comes from the soul, but they both have the same task – to create emotion. The trick is to make sure both are evoking the same emotion.
If you’re writing lyrics to music you need to be sure you aren’t subverting the composer’s intentions in order to accommodate your lyrics. Similarly, if you’re writing music to lyrics it’s important to recognise the emotion those lyrics evoke and compose appropriately. A dirge-like melody is not going to sit happily with words of a glorious spring and budding romance, and a happy floating melody shouldn’t be dragged down by funereal lyrics.
Food for thought.