Are melodies important? - Yes indeed, melody is the emotion of the lyrics made aural. I liken this to voice inflection in poetry recitation or story telling.
What makes a good melody? – That which evokes the emotion of the message of the lyric in the context of song. In the context of dance tunes it would be that which motivates the dancers to dance.
Where do melodies come from? – The soul.
Can anyone write a melody, or does it take a trained musician? – Anyone that can offer their emotion in an aural context certainly can. I can't read a note of music and have a modicum, at best, understanding of theory. I've developed (I can't say composed as I've never written a note) many different melodies. I usually have a friend play it along to my lilting.
What is the value of recycling old melodies versus writing new melodies? – I don't think it an either or circumstance. Coupling an old air with contemporary lyric can evoke the thought that things may not have really changed over all this time of human social evolution and as well a new melody taken with old lyric.
Are there changing styles in melodies? – Of course, look to the evolving nature of musical genres.
How do you go about writing a tune? – I think it more that the tune finds you rather than you it.