A harvest legend coming from the North Western European area of England or Scotland, the poem, later set to music, symbolizes the growing season of a field of barley and the tasks needed to grow, harvest, thresh, and finally ferment it into an alcoholic beverage.
The song can be viewed as an allegory of birth, death and rebirth. (https://poemanalysis.com/robert-burns/john-barleycorn-a-ballad/)
Typically sung during Sabbats with connections to sacrifice.