Mistwell
Crusty Old Meatwad
If a game is taking place primarily in a dungeon or similar enclosed space (building, set of caverns, the burrowed tunnels of a creature inside the skull of a deceased god floating on the Astral plane, whatever), then I think melee is often more powerful than ranged. However if your game is taking place primarily in the wilderness of similar open space, then I think ranged is often more powerful than melee.
I find quite often the power of melee isn't the damage it deals, though that is certainly relevant. It's the standing next to foes, drawing their attention, and focusing their fire on you (with your higher AC and higher HPs) rather than on the squishier members of your party (with lower ACs and lower HPs). And despite that being an extremely common tactic which was so prominent it even got a name for it in at least one prior edition of the game, it's a harder element to place a number on it to assign some value to it. So, it often gets left out of mathematical analysis.
It's not that D&D analysis is unique in this respect. Sports analysis often suffers from this same problem. For example, the value of a player in the NBA who constantly is clogging the open lanes while they are on defense is extremely high but also extremely difficult to assign a value to that tactic. They might be the best player on the court that night, but because they're neither making a basket nor passing a ball nor stealing a ball nor rebounding a ball nor ever really touching the ball, it's often left out of common analytics. Nevertheless everyone who knows anything about the sport knows it's very valuable, and will try to come up with some sort of way of measuring it (like figuring out if the other team is scoring fewer points while that player is out on the court - a very imprecise measurement but at least it's something).
Bottom line - melee combatants getting in the face of foes and drawing their fire is often a very valuable but difficult to measure quality of melee combat. At least, in dungeon-like environments it is.
I find quite often the power of melee isn't the damage it deals, though that is certainly relevant. It's the standing next to foes, drawing their attention, and focusing their fire on you (with your higher AC and higher HPs) rather than on the squishier members of your party (with lower ACs and lower HPs). And despite that being an extremely common tactic which was so prominent it even got a name for it in at least one prior edition of the game, it's a harder element to place a number on it to assign some value to it. So, it often gets left out of mathematical analysis.
It's not that D&D analysis is unique in this respect. Sports analysis often suffers from this same problem. For example, the value of a player in the NBA who constantly is clogging the open lanes while they are on defense is extremely high but also extremely difficult to assign a value to that tactic. They might be the best player on the court that night, but because they're neither making a basket nor passing a ball nor stealing a ball nor rebounding a ball nor ever really touching the ball, it's often left out of common analytics. Nevertheless everyone who knows anything about the sport knows it's very valuable, and will try to come up with some sort of way of measuring it (like figuring out if the other team is scoring fewer points while that player is out on the court - a very imprecise measurement but at least it's something).
Bottom line - melee combatants getting in the face of foes and drawing their fire is often a very valuable but difficult to measure quality of melee combat. At least, in dungeon-like environments it is.