The Merovingians are known as the "long haired kings" due to how their long hair set them apart from the generally short hair favored by the rest of the Franks. Those who had their hair cut were no longer able to be king. Why was long hair such an important symbol for kingship? Is it just a tradition that has origins from the Franks' time in Germania when they lacked written records? Do historians not know and its a strange idiosyncrasy of the dynasty?
What a great question! Unfortunately, despite various attempts among the scholarly community, the origins of the practice is likely beyond our abilities to answer definitively. Theories have at various points emphasized a German origin, utilizing Roman ethnographies and commentaries in an effort to uncover the origins of the convergence between hair and kingship. These are problematic, however, and ignore the role of literary tropes employed in the description of 'barbarian' peoples, and the ritual cutting of hair is not itself a practice unique to the migratory groups in Late Antiquity or unknown to Gallo-Roman society.^1 Explanations that stress the magical properties of Merovingian hair, invoking images of sacral kingship, also fall short-- we simply lack the evidence needed to support the argument that royal hair functioned as a 'pagan' holdover.
That does not mean that the Merovingian hairstyle was not itself an older practice with origins beyond the Rhine, but symbols change and are renegotiated over time and it is possible that hairstyle took on new meanings as the Franks encountered and blended with the Gallo-Roman society they encountered. Hair as a marker of social status was not limited to the Merovingian line-- when the hair of the Syrian merchant Euphronius was cut by the bishop of Bordeaux, he went into hiding until it regrew. The involuntary shearing of a person's hair might associate the victim with positions of social restriction that might otherwise prevent them from participating in their occupation; the restrictions placed upon a tonsured member of the ecclesiastical community is one example. Likewise the Visigoths and other early medieval societies associated tonsuring with a loss of social status, barring the individual from participation in worldly rule.
In "Hair, Sacrality and Symbolic Capital in the Frankish Kingdoms," (in The Construction of Communities in the Early Middle Ages: Texts, Resources and Artefacts), Maximilian Diesenberger rightly states that we cannot divorce Merovingian hair from this larger discourse between physical appearance and social status in the late ancient/early medieval world. Utilizing Pierre Bourdieu's theory on symbolic capital, he argues that the distinct Merovingian hairstyle^2 functioned as part of the family's symbolic capital, the accumulation of which was crucial in in the maintenance of the social bonds tied up with early medieval kingship. He also emphasizes the power dynamics underpinning the tonsuring of individuals and the perceived (and sometimes ignored) loss of status and honor, even when the hair returns (as is often the case).
However, as Diesenberger points out, the symbol itself is in constant negotiation, subject to the values, significance and purposes circumscribed upon it by participants in Frankish society at different moments. The frustrating answer is that the hair was important because it was tied to the Merovingian family and their social status with Frankish society in a tradition believed to go back to the dynasty's founding. Beyond that, whatever meanings the Franks or Merovingians might have associated with the long hair remains elusive. In his chapter on the sixth century Franks in the Cambridge Medieval Histories series, Raymond Van Dam expresses that it might be no accident that the only non-'German' name chosen for a Merovingian child was Samson. Speculation aside, it is possible (if not likely) that multiple meanings and associations existed simultaneously, perhaps even in apparent contradiction.
^1 See the capillatura and barbatoria, the ceremonial first haircut that marked a right of passage into adulthood. The tradition survives into the early medieval period. Diesenberger connects these with a later addition to the Lex Salica that prohibited the shaving of a young man or woman against the consent of the parents, possibly implicating monastic foundations that might attempt to take advantage of tonsured children and the acquisition of the child's inheritance.
^2 The ubiquity of physical appearance markers aside, by the sixth century the long hair of the Merovingians was exclusively associated with the family and even appears in our Eastern Roman sources! The hairstyle was acknowledged as a sure-fire way to recognize a member of the family, be it on the battlefield or in the grave.
I don't think that historians have really any idea where the practice of long-haired Merovingians came from initially, but there seems to be a general agreement that it was a way to mark the royal family out as special, and a particularly visually distinctive one at that. The Merovingians were very unusual in making their ancestry and family a key factor in their legitimization of power, in stark contrast to the Western Roman Empire before them or even contemporary 'barbarian' kingdoms such as Lombard Italy or Visigothic Spain, where dynastic change was regular and no big deal.
So the TL;DR is that because the 'I deserve to be king because my daddy was' logic was so rare in those days, it helped to mark the royal family out as special in as many ways as possible.
My current source for this is Chris Wickham's 'The Inheiritance of Rome', chapter 4, but only because I don't have Ian Wood's 'The Merovingian Kingdoms' to hand: Wood's book is always the best place to start on Merovingian Francia.