As per "The Ballad of Songbirds and Snakes" we see with certainty the Lucy Gray Baird wrote the lyric/tune.
The inspiration as stated by previous answer - the execution by hanging at the "Hanging tree" of Arlo Chance. We know he killed 3 (assume by accident) in an attack (presumed to be) aimed at disruption/closure of coal mining operations.
A token gesture of a rebellion that may never die. Indicative to Snow that the rebellion is never far from the surface in District 12.
Lucy Gray - more intimately exposed to those of District 12 (and the rebellious nature). As an artist she is inspired.
We know therefore that there's a direct literal interpretation of verses 1 & 2. They did indeed string up a man who 'murdered' (deliberately or not??) 3; and who called out for his love (Lil) to flee. Strange things did happen - including the Mockingjays erie echo of the last words of the condemned.
The verses 3 and 4 are interesting. This is where artistic license arguably enters into the lyric.
"Where I told you to run; so we'd both be free"
Was that a nod to those continuing the battle 10 years after the war - effectively continuing to "run" as a metaphor for fighting. The old saying of "Better to die on your feet than live on your knees". So perhaps the Rebels were choosing to "Run to be free"; striking back.....for revenge....for keeping the dream alive even if as a series of token and perhaps futile gestures.
Or - - run away to be free. Free of repression - - even if there were no guarantees. Run to the North and escape as per the apparent plans of Billy Taupe?
So verse 4 - "Wear a necklace of hope; side by side with me"
Many interpret this as the dead man in the tree - inviting his lover Lil to effectively join him in death in that tree (and that effectively happens - as her fate).
However - the songwriter - Lucy Gray - has been planning an escape for some time. District 12 is NOT her home; not her people. What is her vision? She is perhaps living towards the prophecy of "The Ballad of Lucy Gray". To effectively disappear and leaving no trace.
However - she admits - she can't do it alone. Oh - but she IS a survivor and shows herself as more than capable. So what can't she do alone? She needs a man? a lover? for hope of family? A companion? Billy Taupe it seems had envisaged Rebellious band on the run; fleeing to the North to whomever they may find there. (false hope perhaps; but better than none?). Is Lucy truly a rebel? To flee with rebels? She reveals the basis of he animosity towards the capital when discussing the fate of her parents. And perhaps that of itself was a moment that confirmed - with the revelation from Snow regarding his father - that their's was an impossible connection.
So - Lucy was already planning some form of escape. The "necklace of hope" could imply a sense of jumping from the frying pan into the fire - - it may be a death sentance either way however the question remainded of which scenario at least provided hope?
And side by side with me - perhaps she DID truly envisage Snow as a new life companion - at one point anyway. And unless she was playing Snow to create a love triangle to try to lure Billy back; she orthwise had Snow in mind when penning the lyrc - however; I suspect reality dawned.
Her very complicit 'acceptance' of his gunning down of Mayfair Lipp. She said the right things. He did it to protect her. However - to her she may have realised that he did it to protect himself and did so instinctively.
And perhaps after all - she was pragmatic enough to see that their shared "Necklace of hope" applied to them more so if remaining "side by side". Snow wasn't cut out for life on the run/in the wilderness - it would only end badly. He had a different calling.
"Trust".
I suspect she had learned more about Snow than he had himself. And she was able to trust his motivations and his calculations. Trust his actions. That allowed her to communicate in a coded format. That allowed her to direct him and trust in his analytical and observational comprehension. To be 'manipulated'? And that allowed her to lead him to the building where the guns would be. Perhaps a final test. And her actions confirmed via the discussion around killing three. Had she suspected he might have sold out Sejanus - - because; the simple fact that only Sejanus had been arrested indicated that Snow was not implicated. Lucy Gray was far from superficial; her analysis and observation and cunning were clear. And so from there by the lake - if need be she would 'run' to be free and at the same time set Snow free. He gave her the energy to go and become a 'ghost'; and in essence allowed her to divorce herself from any rebellion.
And that then leads to what happened to her and the not too secret notion - - is Greasy Sae Lucy Gray??
And the other notion is - the life of the "Hanging tree song". How does that song live on? The covey no longer perform at the Hob. Does Maude (with her fantastic memory for songs/tunes) perhaps teach the song to her son who teaches his daughter??
Just a thought.