First of all I'm sorry if this subreddit is the wrong place to ask, I couldn't think of a better one to get an informed answer.
"Scarborough Fair" is a ballad of medieval origins in which two separated lovers give each other various impossible tasks to complete in order to prove their love for the other. The best known version was maybe recorded by Simon & Garfunkel in 1966.
In each stanza the four herbs are mentioned as a sort-of refrain, and my question would be if there's any significance about them from the viewpoint of the middle ages. I've read different interpretations that range from birth control to medicine used against the plague, or are they actually just random household herbs? Do you have any informed insights?
Are you going to Scarborough Fair?
Parsley, sage, rosemary, and thyme;
Remember me to one who lives there,
For she once was a true love of mine.
There are two possible meanings. The first is that no, they have no meaning, and are just inserted into the song as part of the dance that accompanied the song. The second is that they do have a meaning, but that it is rooted(no pun intended) in medieval pagan herb lore and witchcraft. It's also plausible that both are true, and that the line was inserted as a part of the dance that went with the song, but that the line had origins in the older lore surrounding those plants.
So to the first explanation. As you noted in the description, the ballad is an old one, matching the story of a Scottish ballad titled 'The Elfin Knight', which is #12 on the Roud Folk Song Index(interestingly, Wikipedia has Scarborough Fair bracketed next to it). The story of the song involves two people setting Herculean tasks for each other in order to win love in one version, and for an elfin or demon suitor to conquer the lady in another.
'The Elfin Knight' doesn't feature the refrain you're asking about, and the earliest appearances are only in the nineteenth century, suggesting that it was added in from an existing song. An article in the Journal of American Folklore from 1894 says that the refrain "belongs to the dance (for the ballad was a dancing-song), not to the story." This makes sense, as their are multiple versions of the song given in the article(which is titled American versions of 'the Elfin Knight'), some of which feature variations on the refrain, "Let ev'ry rose grow merry in time", and others which omit the refrain entirely, such as one from 1828 which instead goes from task to task with no filler.
So we can see that the song in question is far older than the refrain, and as such, the refrain most likely has no meaning related to the song. However, this brings me to the second possibility I stated above which is that it may have meaning in medieval herb-lore.
An article by A. G. Gilchrist in 1930 describing refrains in British ballads points out that riddle ballads, such as 'The Elfin Knight' and 'Scarborough Fair' are, commonly used the invocation of herbs and other plants as magical protection against evil. He says, "the carrying or invocation of magical herbs seems to be the pagan prescription for defence" against evil spirits. This would back up the idea that the line was inserted because of its relevance to the story.
Noting that there are a lot of deleted comments on this question, there might have been attemped answers at relating the herbs mentioned to their believed "magical" properties from the medieval and ancient eras. However there are many different beliefs surrounding this, with some sources citing thyme as an emblem of bravery, while others see it as a harbinger of death.
EDIT: I found another source, which I've added at the bottom(it's the third one), referring to a book of herbs and their properties published in the early sixteenth century in London. As the article says, the author of the book is more inclined to romance than to fact, but it references an even earlier source, as well as providing a contemporary view on the herb rosemary. In the book, rosemary is said to protect from the plague, by virtue of its sweet smell; to give a fair face(presumably clear skin) when boiled in wine and used to wash the face; and to preserve youth when a box is made of the wood of the plant and it is smelled. This link between smell and warding off evil(time, plague), ties in with Gilchrist's description of carrying certain herbs, as the most powerful herbs against evil were believed to be the sweetest smelling ones.
Sources:
American versions of the Elfin Knight, The Journal of American Folklore at Jstor.
A Note on the "Herb" and Other Refrains of Certain British Ballads, A. G. Gilchrist Journal of the Folk-Song Society at Jstor(also available via a Google search I believe).
Herbs, Herbals, Herbalists, Helen Bancroft The Scientific Monthly at Jstor.