Tunes with simple ups and downs are easier for our brains to latch on to. These “melodic arcs” are common in nursery rhymes but also feature in many pop songs and classical pieces.
Unusual or unexpected “melodic leaps” are another feature of earworms. Lady Gaga’s Bad Romance is a good example, as we hear in this clip: