One thing that is all over the map in science fiction is the issue of combat ranges. Different universes present combat at ranges ranging from the astronomical to that of a spitball.
This is also true within universes . . . for instance, Star Trek's original series presented decently-astronomical ranges, but when it was decided that Star Trek II: The Wrath of Khan ought to feature ships firing from one another within visual range (a somewhat obvious "homage" to the Star Wars film battles, considered more exciting), the idea of the Mutara Nebula was created in order to explain the short ranges involved (†). A mix of short- and long-range combat was thus featured in later Trek series, as well, depending on "dramatic intent" (i.e. the whimsy on any given day of writers, directors, VFX guys, et cetera).
That said, it's still possible to derive useful information.
In any discussion of weapon range, it's important to distinguish between maximum range and maximum effective range. An old flintlock might be able to throw its projectile a maximum range of a few hundred meters (give or take ... I'm just making that up), but you probably couldn't expect to hit anything at that range. Thus the effective range is much less.
Some also get confused because of the issue of optimal range, which is not only a more context-specific issue, but generally requires that we know more about the specifics of systems and situation than we usually can.
For the purpose of our intergalactic squabble, the value we're most interested in is effective range. A simple unguided kinetic projectile, for instance, launched in space will continue on its course basically forever. Thus its maximum range is basically infinite. But for the purpose of ship-to-ship combat, the kinetic weapon's effective range will be determined by how fast it goes and how quickly the enemy ship can try to get out of the way before getting hit by it.
Star Wars Weapons Ranges
Star Wars has been pretty consistent in its showing of vessel weapons ranges. As elucidated in the link above, combat strictly involving fighters or similar small-scale vessels is limited to a handful of kilometers at most. Actual observed ranges are far less than a kilometer. Combat between fighters and capital ships is limited to about 100 kilometers from the big ship, and a handful of kilometers at most from the fighter.
Between capital ships, a theoretical maximum effective range of 5500 kilometers is calculable, though in canonic practice long-range combat is measured in the hundreds of kilometers at most, and usual combat range occurs within tens of kilometers if not less. We may thus grant perhaps 1000 kilometers for longest-range combat, with 100 to 200 kilometers as a normal effective range. Optimal range seems to fall more in line with the 20km-or-less battles we usually see.
Star Trek Weapons Ranges
Star Trek weapons are fired frequently at ranges varying from twenty paces to two hundred thousand kilometers. Against small vessels like runabouts, capital ships may be limited in range to 5000 kilometers or so, though even an evading starship from a century ago can successfully hit a one meter object from about 90,000 kilometers.
Capital ship combat has been seen to occur at ranges of 200,000 kilometers, though more common ranges are in the tens of thousands of kilometers. Combat also frequently occurs at much shorter ranges. Pondering of this and examples of ranges appear in the link above.
While I frequently try to give Star Wars as much credit as possible, the simple fact in this case is that Star Wars simply gets stomped on the issue of range. The difference is devastating. In the below visual aid, for instance, I couldn't even fit the icon for the Imperial ship in its weapons range area, and that was after I made it near the theoretical maximum . . . vastly greater than what we've observed Star Wars vessels capable of, unlike the 200,000 kilometer observed Star Trek radius.
Combined with other issues, such as Star Wars capital ships having no less than ten times poorer acceleration ability than their Federation counterparts coupled with significantly less maneuverability, it's clear that Star Trek vessels enjoy significant advantages in sublight combat.
† - Information from "Inside Star Trek", in an interview with Production Designer Joe Jennings.