Dueling is very much entwined with honor. However, the concept of honor in centuries past is very different from what most people think of as honor today. For one thing, the socially accepted concept of honor had very little to do with being a "good" person. It was tied directly to nobility -- if your family was rich and had the favor of the king, as well as a noble title of some kind (Duke, Prince, Earl, etc.), then you had honor.
If you were a noble, you had to constantly protect your honor against various challenges to it -- and not just your own honor, but your entire family's honor, for several generations forward and back. There were several ways to lose honor, but the most common and most important was to be considered a coward. The best way to avoid being considered a coward was to challenge anyone who insulted you to a duel and to accept any dueling challenges offered to you. To refuse would mean that your opponent could publish an account of your cowardice, report it in church or simply spread the word to all his friends.
This loss of honor was not a completely abstract concept. Under some kings, failure to uphold a dueling challenge could result in a loss of noble ranking. Some countries even had laws that punished "cowards" with excommunication from the church, the loss of voting rights or outright imprisonment (Holland, pg. 31). To these men, it was better to die respectably in a duel over an insult than to live on without honor.
One aspect of being noble is that you were not allowed to work or to buy or sell anything (this would result in a loss of honor). Nobles were expected to live off the rents from their family's huge tracts of land. One result of all this not working was boredom. As the centuries went on, dueling became almost like a sport for young, bored noblemen. Sometimes they would intentionally insult people or cause trouble, then claim that they were "insulted" because someone bumped into them. If all else failed, they would throw down the gauntlet simply because another noble wasn't polite enough. When a noble was in the company of a lady, her honor was considered so fragile that anyone who did anything the least bit impolite within sight of the lady was liable to end up in a duel (Holland, pg. 38).
Another important factor is the belief that the winner of a fair fight was a superior person to the loser. He wasn't just a better or stronger fighter, he was better all around -- more honorable, wiser, and most important, favored by God.