I'm going to be the obligatory 'way-too-long-answer guy' and construct an overly long answer.
A duel is a case of honour. (Note: This is always spelled with a U, even if your English is Americanized. If you don't know why, you don't got it.) The basic premise being that one man has made a slight against the honour of the other, for whatever reason, and the challenge is made to prove that honour. Thus, the duel.
Being that this is a matter of honour, pride, and all that other sort of lot, it is only sensible that the point would be to best the other in the proving of it. Therefore, the best circumstances would be hand-to-hand combat.
Fighting hand-to-hand, especially under honourable rules, is a direct confrontation and display of physical and mental strength, is incredibly flexible and dynamic, is a metaphor of application of force, with the controlled body as the weapon, reveals the character of the combatant through the style and manner they fight, and has the benefit of bruised bones and egos, rather than a wasteful, senseless death signifying little. Given two very roughly-matched opponents, hand-to-hand combat requires a concert of strategy and strength in order to best the opposite, a clear demonstration of superiority, and is therefore the best reflection of honour, character, and the lot.
Should the duel require death as the conclusion, for whatever necessarily extreme reasons, the sword is the ideal choice. The sword is yet again a metaphor for force, as it requires both strength and skill wield, and intelligence to utilize. It is very swiftly and smoothly lethal when used properly, but against an opponent with skill, every maneuver can be countered. Thus, like with hand-to-hand, with the sword a dynamic of point and counterpoint is established, and besting the other with a clean kill requires the other to be thoroughly outmatched and outmaneuvered, and again superiority established. The basic concepts can less-lethally be found in other weapons, such as the staff.
The issue with the gun, however, is that it's too simple, too direct, and has much smaller margins for skill. Whereas sword and hand require a multitude of elements working together, and is a direct extension of the body, the firearm operates independently, and is simply manipulated into functioning with desired effect. Now, the gun is an exceedingly useful device, and I rather like them, myself. However, as for settling disputes of honour, it is rather unsuited. With the other methods, every motion can be countered, in numerous fashions and effects. The lead projectile, however, has no counter or response, as once fired, it is either on target, or is not. There is no Max Payne solution. Either something hits, or it doesn't. Also, the interaction is severely limited. The duel essentially rests on the whims of chance, as even the best-trained shooter has natural variance, the gun itself has natural variance, and practically nobody is as accurate as you think they are by a mile. Even format is less satisfying. The classic speed draw is near-instant, largely chance-dependent, and likely as not to end up with both dead. Any arena-style confrontation also relies on luck of positioning and aim, given how fickle and definitive firearms are.
What firearms lack is that synergy, of all elements of body and mind utilized in concert, an expression of man in his whole within combat. It reduces man with honour as a being with meaning to a doll tossed about on the winds of fate.
And that's just no good.