I think modern life is pretty great compared to all the shitty aspects of the past which have already been mentioned. However I think the cause of our misery today is jut different from the cause of misery say 50 or so years ago.
Mental illness aside, my theory is that the key to happiness is two things: expectations, and human/social connections. Most miserable people either have expectations about life that are not being met and are therefore constantly disappointed, and/or they're lonely. Both of these things can be made worse by certain aspects of modern life.
When it comes to expectations, well, these days we are always bombarded with images of the perfect life: online, on TV, through other people's bragging on social media etc. Think back 60 years and people had a lot more modest expectations about what makes a happy life - a stable job, settling down and starting a family, a roof over their head and food on the table, and that's pretty much it... Whereas these days we have bigger ambitions in life - travel the world, get famous, change the world, have a high flying job, become a successful entrepreneur, an Instagram star, etc... Nothing wrong with ambitions but the trouble is it that a simple life no longer seems 'enough' to be happy.
And when it comes to loneliness, well these days we live in less tight-knit communities and families, more living in cities, doing a more socialising online instead of meeting in person, all these things can make people lonely.
So yeah, expectations and human connections. Fortunately both of these things are things that are somewhat in our control as individuals - those of us who are fit and able can go out and try to make human connections, whether that's meeting new people or just making more effort to connect with our families and friends. And with some effort we can re-learn to have simpler expectations and appreciate the little things in life, going back to basics. For me, having kids (especially toddlers!) has helped me see the world through fresh eyes and appreciate simple joys more. This is how I lead a happier life.
Anyway, that's my take on things.