A melody has to catch the ear. A lilt is an up and down movement that has to be asymmetrical or surprising in some way. It can go up, and then down. That is fine, if there some surprise there, or some element not completely predictable. It also has to have a shape, and be intelligible as a series of related phrases. I think that everyone, even those with no musical knowledge, understands a melody, everyone could be able to say: it goes down, then up, then down again but to a place lower than where it started. Or it leaps up and then comes down by steps. Or it goes up in smaller leaps and then down on the same notes. Just as there is a harmonic rhythm (how fast the chords change) there is melodic rhythm, in the same that the same sequence notes will not be same melody if the rhythm is very different.
I know how to write a melody, and I did it well the first time I tried. A melody can be very simple, like the first three phrases of "I got rhythm." A simple melody is not worse than a complicated one, though. It can have more or less movement, and move across a wider or narrower range. Since my melodies are mine, I like them. They express exactly what I want them to. I work them over until they are what I want them to be. I'm not afraid to repeat a note 5 times in a row.
I generate melodies through tension with the chords, using a lot of ninths and chromatic movement in the underlying harmonies.
Could someone explain why one melody is better than another? I know some melodies are more catchy, some are beautiful. Some are elegant and symmetrical. Some of my favorites are these
The Blessing (Ornette Coleman)
Monk's Mood (Monk)
Wachet Auf... (Bach)
Star Dust (Carmichael)
Lester Leaps Up (Young)
Sometimes I know there is a melody, in a technical sense: notes that move in a way that is intelligible, but I feel that there is not really melody in the sense of something that I would have wanted to write as a melody. It is scrub-a-scrub baroque music of the mediocre sort, or its Clementi equivalent. I get tired of jazz improvisation when it involves a lot of aimless running up and down scales, rather than melodic development. You can have a melody that happens to coincide with a certain sequence of notes of a scale, in fact that is impossible to avoid. But you shouldn't write a melody that's just a scale.
I saw the movie Evita, and, though it is all sung, there are not melodies in the sense I mean. It is like talking, but non-melodically, on designated pitches.