While I agree with you in some parts, I’d also point out that Science Fiction has a long history of association with dystopia. For every Jules Verne celebrating the exuberance of their times, there was an H G Wells speculating on the degeneration of human civilisation. Ironically, it was Wells’ attempt at utopia (the book Modern Utopia) which inspired Aldous Huxley to write Brave New World. Even Star Trek (of which I am a great fan) has a back-story where the 21st Century is an age of nuclear war, kangaroo courts and militant factionalism.
It’s true that nowadays people seem more interested in dystopian writing. However, I’d argue it’s more about art imitating life rather than the other way around — when economic recession, climate change, armed conflict, global terrorism and increasing surveillance are brought together, it can make for a potent environment for dystopian literature. Honestly, more than writers, I’d feel better if news channels start becoming more positive and Silicon Valley becomes a little more introspective (not pessimistic though).