I'm pretty TP is the way it is partially because of the fan backlash in direction with WW.
After MM, many people were expecting the series to stay rather dark and "realistic", and the Space World demo to affirm this. However, when WW and its cel-shaded graphic came along, several fans felt the game would be "kiddy" and "silly". Mind you, I love WW, and its dark in its own way, but that isn't what a lot of people expected. So, when developing TP, they tried to correct this by making the game deliberately darker, more realistic, and more "mature".
TP and MM are both fairly dark and mature games, for sure. But I'd say they're pretty different in the way they accomplish this tonally. MM has an artistic maturity to it- it's a detailed, character-driven world, and it's all at risk due to the ever-present doom over their heads. This felt really real and organic to me. The more mature elements of MM were natural by-products of the game's story and its main themes, the central gameplay focus on side quests and time-based restrains, and even the game's development (the short development time for the game made the creators feel "pressed for time", and this feeling ended up being translated into the actual game). It just felt natural, because the all the little things logically lead to being mature.
While TP was dark, it felt more intentional, and honestly, forced about being so. Don't get me wrong, I like TP in its own right, but instead of feeling organic about having its mature themes, it felt like being dark was its main objective (and possibly so, given the backlash from WW). Instead of the dark elements being a by-product of the game's other elements, the other elements of the game tried to make the game feel dark.
If example, in MM you take on the form of a lowly deku sprout and get stuck in the doomed town toward the start of the game. In TP, you become a wolf, because that's just what form the Triforce of Courage conveniently allowed you to turn into. In MM, you had to save the world from the moon, because every three days it will crash into the earth. In TP, areas of the world literally become dark, and you have to save them from the darkest (the Twilight).
Again, while TP is dark and isn't bad by any means, I prefer Majora's Mask way of going about it by not forcing it. It depends how you define what "dark" is. I personally feel the darkness derived from the emotional and artistic aspects of MM are better.