It's a very common saying in India, reflecting the cyclical nature of life and the constant interplay of happiness and sadness.
The phrase is also the title of a popular Bollywood movie, "Kabhi Khushi Kabhie Gham..." (sometimes translated as "Sometimes Happy, Sometimes Sad"), which explores the complexities of family dynamics and the ever-changing tides of emotions.