It is important to set out an overall tone for your writing (whether it is novels, scripts or shorts) because it is part of the matrix of glue that holds everything together.
Dark and light are thrown around all the time. Villains are evil and heroes are good. The quest is dangerous and their hometown is lovely. Of course you can reverse it, the hometown can be horrific and the quest will be then to fix it. These all lead to the idea that everything is heading towards the light and improving the situation through conflict.
The other side is when stories head towards the darkness. This usually happens in longer formats and is part of the massive success of TV series (Breaking Bad, Sopranos, The Wire) and long format books (ASoIaF). The writers can ignore conventions (I guess ignoring conventions has become a convention?) and shit on their characters/world/plot. Characters can become spiteful, conflict can erupt and hometowns can be destroyed/warped. The key to success is to show no real end to the conflict and have sympathetic characters turn into real bastards. This then allows the scope to create an evil ending or have your characters die without it feeling out of place.
This concept of a darker tone is in my opinion is one of the reasons TV has overtaken the film industry as the pillar for entertaining stories. How much exploration of these ideas can you really do in the confines of two and bit hours?
To use this in your own writing, consider the idea that a character (or even your world) has a best before date. Let them slowly crack to reveal a rotten core. This isn’t about creating a depressing story, it’s about writing something that has a ‘bad’ ending that doesn’t feel tacked on just to be edgy.