The guy from this site has made a nice sum-up of this kinda question:
OK, so you don't want to bother reading through this whole site, right? OK, here's the drill for you impatient people:
Why does anyone care about this stupid subject?
Why do you care? Don't pretend not to care; if you didn't click "back" as soon as you figured out what this website was about, you're interested. You may not want to admit it, but that will just be our little secret, OK? Now read on.
First, Star Wars vs Star Trek normally means "could the Empire kick the Federation's ass". If it's a question of taste (ie- "do you like Star Wars more than Star Trek"), debate becomes impossible because the answer is subjective. Anyway, once we agree that we're talking about military prowess, people like to perform substitutions: instead of Federation vs Empire, suddenly it's the Borg vs the Empire, or Species 8472 vs the Empire, or the Q vs the Empire, or perhaps the race that built the Dyson Sphere vs the Empire, because all of them showed up at some time or other in Star Trek. But lest we forget, Star Trek is basically about the Federation, remember? That's the technology base. Subject changes are quiet admissions that the Empire would wipe the floor with the main characters of Star Trek, so you've got to resort to one-episode wonders (even if they're long-gone, or just as likely to turn on the Federation, or if they've been stymied by the Federation in the past, which would call their abilities into question).
I've Played X-Wing Rogue Squadron, and Star Wars ships don't seem that tough to me
I've also played F-15 Strike Eagle II, and in that game, an F-15 can take a half-dozen direct hits from SAM's before it goes down (in reality, one proximity hit will kill it easily). Can we agree that it's silly to use computer gameplay as a basis for technological assessments? Generally speaking, the sheer scale of the Empire (millions of planets, able to build moon-sized Death Stars) is vastly greater than that of the Federation, so Trekkies try to take the sheer size and numerical advantage of the Empire out of the equation, and simplify matters into straight ship vs ship comparisons. Leaving aside the tacit admission of defeat already implicit in this practice, there are several different popular ways to decide what is and isn't valid evidence:
The Lazy Man's Method
Simply grab figures from the official publications. Of all the voluminous Star Wars and Star Trek publications out there, only one for each series gives meaningful specifications in real-world units: Star Wars Episode II Incredible Cross-Sections (SW2ICS) and the Star Trek Next Generation Technical Manual (TNG TM).
Star Wars: Acclamator troop transport
Star Trek: Enterprise-D
Light guns: 300 million GW (6 megatons per shot, 24 guns, assume 1 shot every 2 seconds for time-averaged power output rather than peak output)
Main phasers: 3.6 GW (5.1 MW per emitter, 200 emitters in the main phaser array, 2 full-sized saucer arrays and 3 smaller roughly half-size arrays on the stardrive section, p.123). Note that phasers appear to have a chain-reaction effect so their raw power output may be deceptively low.
Heavy guns: 2.4 million megatons (200 gigatons per shot from each turret, 12 turrets)
Photon torpedoes: 64 megatons max theoretical (based on 1.5 kg antimatter payload, p.129)
Sublight acceleration: 3500G
Sublight acceleration: 1000G (design goal, p.75)
Operational range: 250,000 light-years (before refueling)
Operational range: 2750 light-years (7 years at warp 6 before refueling, p.3)
Shield heat dissipation: 70 trillion GW peak
Shield heat dissipation: 3311 GW peak (473 GW per generator x 7 generators, p.138)
Reactor power: 200 trillion GW max
Reactor power: ~4 billion GW at max warp 9.6 (scaled from the warp power chart on p.55 which uses units of joules for power; we assume this is a simple mistake). From the chart, their fuel supply for 7 years of warp 6 cruising would be roughly 2E23 J (enough to run an Acclamator's reactor at full power for just 1 second).
Max hyperspace speed: not stated (however, the ability to travel "halfway across the galaxy" in a matter of hours as demonstrated in ANH, TPM, and AOTC requires speeds in the range of 10 million to 100 million times c).
Max warp speed: ~2000c (warp 9.6), sustainable 12 hours for a single sprint of roughly 3 light-years. This appears to have increased to roughly 3000c for newer ships such as the Intrepid-class.
As you can see, the officially published figures are massively in favour of the Empire, even if you disregard the fact that an Acclamator is not a particularly powerful warship by Imperial standards (an Imperial Star Destroyer is roughly 10 times larger (by volume) than an Acclamator and presumably 10 times more powerful, even if we disregard the fact that an Acclamator is just a transport). In fact, the only way to generate a remotely close match between an Imperial ship and a Federation ship is to use a small patrol craft such as Jango Fett's Slave-1:
Star Wars: Slave-1
Star Trek: Enterprise-D
Main guns: 64000 GW (2 kilotons per shot, 480 rpm firing rate onscreen in AOTC for time-averaged power output rather than peak output)
Main phasers: 3.6 GW
Missiles: 190 megatons (tail-launched missiles; seismic charge mines are roughly 12000 megatons)
Photon torpedoes: 64 megatons max theoretical
Sublight acceleration: 2500G
Sublight acceleration: 1000G
Operational range: not stated (however, Obi-Wan's starfighter has an operational range of 150,000 light-years, and is probably similar).
Operational range: 2750 light-years
Shield heat dissipation: not stated (however, Amidala's personal yacht has shield dissipation of 2 billion GW peak, and is probably similar)
Shield heat dissipation: 3311 GW peak
Reactor power: not stated (however, Amidala's personal yacht has power output of 7 billion GW max, and is probably similar)
Reactor power: ~4 billion GW at max warp 9.6
Max hyperspace speed: not stated (however, same-day flight from core to galactic outer-rim systems requires speeds in excess of 10 million c)
Max warp speed: ~2000c (warp 9.6)
Even this seemingly Trek-biased matchup seems to heavily favour the Empire, with Jango Fett's small patrol craft able to hit the Enterprise-D with much heavier firepower than it can dish out in return. Small wonder, then, that despite the simplicity and convenience of the lazy man's method, most Trekkies prefer to avoid it.
Just What You See, Pal
Some people prefer to pretend the books don't exist on either side, and talk about only the movies (or movies and TV shows, in the case of Trek). This approach has strengths and weaknesses; the visual look of each series is often more consistent than published material (particularly in the case of Star Trek, where the TM contradicts itself repeatedly and has several astonishingly bad science errors. Moreover, the ST books' status has been officially stated as mere "speculation" (see John Ordover), although SW books are supposedly "quasi-canon" (see the Star Wars Encyclopedia foreword). In any case, a lot of people prefer to stick to the shows and movies regardless of what the "official" stance is.
Having said that, the comparison is little better. In Star Trek, most of the figures from the show are reasonably compatible with those from the TM's (not surprising, since the people who worked on the TM also worked on the show), and in Star Wars, most of the figures from the SW2ICS are based on observations of the original trilogy (from Dr. Curtis Saxton). There are limits to how inaccurate one can reasonable expect the TM and SW2ICS to be, and sure enough, analysis of direct observations from the shows and movies tends to generate similar results, albeit with more ambiguities.
Note that it is difficult to gauge the effect of weapons in any meaningful sense unless they are applied to inert objects (if a shell hits an aircraft wing-tank and causes the plane to burst into flames, you cannot attribute all the energy of the resulting conflagration to the shell). This means we need to look for weapons striking inert objects such as rocks, planets, asteroids, etc. I'm afraid this is a rather complicated subject, and you should really look at the rest of the site if you want to know more. However, the following table should help clarify matters:
Planetary destruction: Death Star blast (roughly 20 billion trillion megatons, ie- the number "two" followed by 22 zeroes). Planet blown apart at 5% of the speed of light. Even if we assume the shot was time-lapse photography (not that there's any reason to), the absolute lower limit is roughly 50 quadrillion megatons. Note that even if you scale this monster down by a factor of 10 million (to the volume of a Star Destroyer), you'd still have 5 billion megatons. More than a match for poor Enterprise.
Planetary destruction: 30-ship bombardment in "The Die is Cast" (surface-level explosions create fireballs in the megaton range at most, judging from fireball duration). No sub-orbital ejecta launched from planet's surface at all. Trekkies attempt to ignore weak-kneed appearance of attack and focus on semantics in order to exaggerate the figure.
Asteroid destruction: Jango Fett's seismic charges destroy asteroids in a radius of 5-10 km in AOTC.
Asteroid destruction: according to Riker, it would take the entire photon torpedo payload to destroy a single 5km wide hollow asteroid in "Pegasus". In other words, it would take the entire payload of the Enterprise-D (a capital warship with a crew of a thousand) to equal just one of Jango Fett's seismic charges (a bounty hunter's weapon).
Combat range: in ROTJ, combat initially occurs at ranges of a few thousands kilometres, eventually closing to a few hundred kilometres ("point blank" according to Lando) until Rebel ships are within a few dozen kilometres of the Executor.
Combat range: fleet actions in DS9 uniformly feature engagements at ranges of 5 km or less, just as they do in TNG's Klingon wars or Borg engagements. In "The Die is Cast", Sisko actually orders the Defiant to approach to 500 metres (while taking fire) before shooting at a Jem'Hadar attack ship, presumably due to some disadvantage incurred at longer range. The only long-ranged incidents involve stationary or near-stationary targets.
Speed: travel from galactic core systems to outer rim systems ("halfway across the galaxy" as Amidala put it) is shown repeatedly in ANH, TPM, and AOTC. It is invariably same-day traffic, typically a few hours.
Speed: Voyager took 7 years to crawl across part of one quadrant of the galaxy, even with repeated assists from alien races, stolen technology, and even the occasional shove from a godlike being. Not hours ... years.
If you want to know more about how to glean bits of information out of the shows and movies, check out the rest of the website. But for now, let's just say that this battle would be a one-sided massacre in favour of the Empire.
What difference does it make? Since the film vs film and book vs book approaches both yield the same result, you can mix and match film vs book policies in any order you want (tech books for both, tech books for neither, tech books for ST but not for SW, tech books for SW but not for ST), and the result is the same.
In a straight-up fight, the Empire squashes the Federation like a bug. Even with its numerical advantage removed, the Empire would still squash the Federation like a bug. Accept it.