Some authors, however, are not so great.
I've known or known of authors who berate their editors, make demands, refuse to be flexible with dates and locations for events and signings, and/or all but directly insult their fans at said events and signings. Not surprisingly, this earns them a reputation in the industry as Not Easy To Work With. This goes without saying, but you do not want to be known as Not Easy To Work With.
I know I'm largely preaching to the choir here, but it bears repeating that writing is work, and work can be stressful. Sometimes your sales aren't as great as you'd like. Sometimes a chain decides to flat-out skip your book. Sometimes you're unhappy about a cover or a blurb falls through or your editor gets laid off and you get a new one who's, let's face it, just not that into you(r novel). These things happen.
Regardless, however, you've got to remain polite and professional. You don't have to be all sunshine and rainbows, but you do need to maintain your cool, follow through on your commitments, and keep the lines of communication between you, your agent, and your editor open.
If you earn yourself a reputation in the industry as Not Easy To Work With, you'll find it difficult to get your agent and editor to do things for you, you may have trouble attracting offers for subsequent books/novels, or you might even get flat-out dumped by your agent or house. (It's unusual, but it has happened.) Even if you don't exactly make your agent or editor's Ten Least Likable list, being known as difficult, needy, antagonistic, or temperamental will not help your writing career and will likely hurt it. While being a nice guy won't directly sell your book, it can't hurt, and often helps.
Sure, J.K. Rowling or James Patterson could be the biggest jerks in the world and it probably wouldn't negatively impact their book sales; people will put up with a lot for money and success. But sadly, mes auteurs, you aren't J.K. Rowling or James Patterson (yet), so remember: it doesn't necessarily pay to be nice, but it doesn't cost anything, either.