Overview
"Salad days" is a Shakespearean idiom referring to a period of carefree innocence, idealism, and pleasure associated with youth. The modern use describes a heyday, when a person is/was at the peak of their abilities, while not necessarily a youth.
History
The phrase is attributed to William Shakespeare, who made the first known use of it in his 1606 play Antony and Cleopatra. In the speech at the end of Act One in which Cleopatra is regretting her youthful dalliances with Julius Caesar she says, "...My salad days, / When I was green in judgment, cold in blood/To say as I said then!"
The phrase became popular only from the middle of the 19th century, coming to mean "a period of youthful inexperience or indiscretion." The metaphor comes from Cleopatra's use of the word 'green'—presumably meaning someone youthful, inexperienced, or immature. Her references to "green" and "cold" both suggest qualities of salads.
Fowler's Dictionary of Modern English Usage summarizes several other possible meanings of the metaphor:
From Wikipedia (CC BY-SA 4.0).