Green Grow the Rashes O was sung to a traditional Scottish tune, an early version of which appears in written record as "A dance. grein greus ye rasses" (A dance: Green grow the rashes) as early as the early 17th century (Straloch Lute manuscript, 1627-29). By the time Burns wrote his piece, the modern form of the tune was established and appeared in collections of music as (The) Grant's Rant, John Black's Daughter, Lucky Black's Daughter, Foot's Vagaries, and Green Grows the Rashes, and Burns himself refers to "the merry old tune of that name" (Green Grows the Rashes).
The tune appears in William MacGibbon in Book 1 of Scots Tunes 1742 as Green Grows the Rashes (to be played slow). Tunearch.org tells us that the tune was originally a rant but " in the transition the rant form was dropped and a strathspey rhythm was substituted, a not uncommon fate of rants [a rant typically has two sixteenth notes and an eighth note, usually occurring on the first beat of the bar - see the Gow and Stewart-Robertson versions]".
There is also a Scottish country dance called Green Grow The Rashes.
Green grow the rashes, O
Green grow the rashes, O
The sweetest hours that e'er I spend,
Are spent among the lasses, O
The warl'y race may riches chase,
An' riches still may fly them, O
An' tho' at last they catch them fast,
Their hearts can ne'er enjoy them, O.
But gie me a cannie hour at e'en,
My arms about my dearie, O,
An' warl'y cares an' war'ly men
May a' gae tapsalteerie, O!
For you sae douce, ye sneer at this
Ye're nought but senseless asses, O
The wisest man the warl' e'er saw,
He dearly lov'd the lasses, O.
Auld Nature swears, the lovely dears
Her noblest work she classes, O
Her prentice han' she try'd on man,
An' then she made the lasses, O.
The down-bed, the feather-bed,
The bed amang the rashes--O;
Yet a' the beds is na sae saft
As the bellies o' the lasses--O
The collection The Merry Muses of Caledonia (1799) had two other sets of much more ribald verses- one collected by Burns and the other probably devised by him. These are not the verses now preserved in the well-known song of Burns, Green Grow the Rashes O, which are a more decorous celebration of the pleasures of the flesh over materialism.
On BBC Radio Four's Desert Island Discs, Liz Lochead, Scotland's Makar, or National Poet of Scotland, 2011-16, chose Burns' Green Grow the Rashes O, sung by Michael Marra, as the piece of music she would save from the waves.