A silver lining is a metaphor for optimism in vernacular English, which means a negative occurrence may have a positive aspect to it.[1]
John Milton coined the phrase 'silver lining' in his poem Comus: A Mask Presented at Ludlow Castle, 1634:
It is a metaphor referring to the silvery, shining edges of a cloud backlit by the Sun or the Moon.