This saying means that we should transform bad situations into good ones. Lemons are famously sour in taste, and a sour taste symbolizes emotional pain, while sweetness symbolizes good feelings. So, the phrase when life gives you lemons . . . means when life causes you emotional pain . . .
Lemonade, on the other hand, although made from lemons, is very sweet and much loved. Moreover, many people make fresh lemonade at home from raw lemons and sugar. Making lemonade is part of childhood for most Americans and reminds us of carefree days and refreshment.
This saying advises us that when life is painful, we should make something positive out of the situation. For example, if your car breaks down, then you can enjoy walking and finally get the exercise you have wanted! If your girlfriend or boyfriend leaves you, then you are free to meet new people.
This is a typically American attitude; many people from other nations notice that Americans try to express a positive attitude all the time. We also have other sayings with a similar message: every cloud has a silver lining, see the glass as half-full, not half-empty.