For an objective answer, you may need to refine your question to be narrower in scope. For example, do you wish to know if the damage output is balanced by weapon type? Or, do you wish to know if the damage throughput is balanced by modifiers by weapon type?
The graph supplied by Oblivious Sage begins to answer a smaller, more specific question; but I wonder if it doesn't answer your question entirely. For example, it does not take into account battlefield tactics which vary widely with factors such as terrain, environmental effects, and surprise.
If a party enters a planet and lands on a mesa overlooking a valley, they may find themselves with a superior, ranged advantage over a small party of space goblins that have camped about 200 feet below. If one or more characters own a Shirren-eye rifle, for example, they can line up shots and fire at a range increment of 250 feet in the same round. Once fired upon, the goblins may be hard pressed to close the distance, as they have to clamber up loose, shale rock (difficult terrain that slows their movement) to get to the heroes.
Take that same situation and add jump boots to the goblins and man their party with their own Shirren-eye weapon wielding sniper and suddenly the encounter's challenge rating balances.
The rules do not favor ranged over melee because combat can literally happen in any environment with an innumerable number of variables/conditions. It might be more applicable to ask if certain classes favor ranged over melee (I don't think there's a hard/fast answer to that, either). What I like about Starfinder rules and their relative simplicity is that you can flex your GM creativity and create balance/imbalance as you see fit to further your story along.