A silver lining is a metaphor for optimism in vernacular English, which means a negative occurrence may have a positive aspect to it.