If you're not nice to them, they won't be nice to you, either—in fact, they could get you sent for extra screening, make you check more bags, move you to the dreaded seats by the bathrooms, or even get you bumped from your flight, according to this MSNBC article. Fortunately, it also offers some tips on how to keep on their good side.
Even if I have to grit my teeth to do it, I do try to make a point of being nice to them just on general principles. What a thankless job they often have, and they get blamed by a lot of folks for things they have no control over. There's another job I could never do.
Thanks to the MeCo listserv for the pointer!