I joined for the sole purpose of answering this question.
A mule driver is one who works driving mules, either with the mules pulling a cart, or more likely, a group of mules, each one carrying a load on its back. The mules are roped together in a line, with each mule following the one in front of it. This is called a "string of mules".
As another poster pointed out, mules are the result of crossbreeding horses with donkeys, specifically a male donkey and a female horse. Mules are sterile, something to remember if someone unknowingly compares their sexual powers to a mule. (Doh!) Mules are known for their strength and endurance, however, their most famous quality is their stubbornness, which borders on "orneriness". Look up the idiom "ornery as a mule".
Because of this famed stubborn quality, those that train and work with mules must have their own stubborn qualities, which is what I think is the meaning of the usage in The Red Badge of Courage. The men are being compared to mule drivers because they are tenacious. They show tenacity in battle. The never give up until they have won.
One more idiom: This has nothing to do with the book, The Red Badge of Courage, but some of you might find it an interesting slang usage. The term "Mule" can refer to a person used by drug smugglers to carry drugs across international borders. In this case, the mule is a beast of burden in two senses. He is carrying the physical burden of the illegal drugs and he is carrying the risk, should he get caught by customs or the police.
Hope this helps!
Marcos El Malo