Campaign slogans: Why do some work and others don't?

What makes a campaign slogan work? Some connect with the mood of the times and encapsulate the appeal of a candidate in a few words. Others come across as tone deaf, hurting the candidate.