Flails have always seemed like a fairly goofy weapon to me. I just don't see something that you have to swing around in wide arcs terribly effective, especially if you're in a group with allies. It seems like you'd end up hurting yourself/your friends more often than an enemy. Please correct me in my wrongness.
Also, were flails more of a peasant's "grab anything you can that might hurt someone" type weapon, like other tool-type weapons that were pressed into wartime service (I'm thinking sickles, hammers, pitchforks, and their ilk) or were there legitimate battle-hardened warriors who actively trained in perfecting the use of this odd weapon?
In my reading about Medieval warfare the only time I've heard about the widespread use of flails was in the Hussite Wars during the 15th century. From what I understand the Hussites (who were a massively diverse group, consisting mostly of peasants, that were held together by religious fervor) converted agricultural implements they had on hand into flails. The cornerstone of their military success was the Wagenburg (wagons grouped together into forts in a defensive position and filled with men wielding early handguns) and tbh I'm not sure how the flail was incorporated into that or how it was deployed.
I can't cite you a literary source right now, but I can share this picture I took at the War Museum in South Korea.
They're dated to the Joseon Dynasty, so probably 15th or early 16th century. You can see the chains are quite short, so there isn't much danger of collateral damage. It just allows for a little extra momentum to build up.
Paulus Hector Mair gives us instructions on the use of the flail. So whilst their use on the battlefield is a subject for discussion I think it is certainly highly likely that they were used in judicial duelling in the middle ages, especially given Mair's desire to preserve past historical teachings.
I am going to link to you a thread which is about a year old which can help answer your question. Here is the thread
Now /u/Cereborn linked a picture of some of the flails in the War History Museum in Yongsan, Seoul. Those flails are basically, if you compare them to the pictures in the old thread, farming flails with metal on the ends for added power or destruction. Farming flails are very capable of killing someone.
I visited the Higgins Armory in Worceter, MA a number of years back, and I remember being told there that flails/morningstars were often held in one hand and swung on horseback to deliver concussive force to the head.
Also consider that a flail is a very difficult weapon to block or resist with armour. The sheer force of a heavy ball swung by a well-conditioned soldier could likely break a shield (if not the arm holding it), and would deliver a crushing blow even to an armoured opponent.