A literal translation of the first part of this verse is, That long locks of hair hung loose in Israel.
This is obscure, leaving the meaning uncertain, and so in turn commentators have offered numerous proposals. The best clue regarding its meaning is in the parallelism in the first two lines. Both begin with the same construction: a preposition joined to the infinitive of a verb, followed by a noun that specifies who is doing the action. So, that…hung loose
is likely to be close in meaning to that…volunteered themselves.
The root of the first verb is uncommon, “but its usage suggests that it has to do with either the unbinding, uncovering, or freeing of hair (as in Leviticus 10:6; Leviticus 21:10) or the freeing of people from restraint of some kind (as in Exodus 32:25). The translation most favored in the mainline English versions ('the leaders/princes took the lead,' NIV, RSV, ESV) provides a neat parallel with the second line, but it does not do sufficient justice to the attested meanings of [the Hebrew verb]. [Webb’s] own translation, When locks fly free, takes it as an allusion to the practice (as in Samson) of allowing the hair to grow long as an outward sign of dedication to Yahweh. That is, what the second line expresses literally (the people offered themselves willingly) the first line expresses metaphorically (like, Nazirites, the people voluntarily set aside their normal way of life and dedicated themselves to Yahweh to serve as warriors)."1
2 “That the leaders took the lead in Israel, that the people offered themselves willingly, bless the LORD!