The biggest issue that Star Trek fans have discovered over the years is what we refer to as Peacenik Military Incompetence. Trek has HUGE advantages in tech and weapons delivery, but the mindset of the Federation is to just not use it in war. Basically, they do the equivalent of taking the US Navy and crewing the ships with a bunch of hippie Greenpeace scientists and a couple of token military guys in case someone gets any bad ideas.
War is an inevitable fact of life and should be avoided as much as is possible, but when the bad guys come knocking on your door loaded for bear, it's time to break out the shiny toys and show them why you don't mess with the quiet ones.
There's a whole laundry list of things that can be used in warfare in Trek, but PMI prevents it.
Transporters
My God, this is the biggest waste of potential military assets I have ever seen. Not only can you beam soldiers right into the heart of the enemy ship, but you can beam warheads there as well! The Death Star would have been a breeze to destroy with transporters! No trench runs, no flying through the superstructure of the DSII... just beam a couple of quantum torpedoes into the thing and fly away. Big Boom. Mission accomplished. Total friendly losses? 0 to Negligible.
Transporters have another use that we've seen canonically in Star Trek. Rapid cloning of troops. A transporter malfunction when he was younger split Riker into two separate copies of himself with no degenerative side effects to either. On top of that, the copied version had all the memories and skills of the original. The only thing you need to do is replicate the accident (it had something to do with atmospheric conditions, I believe) and use it on a highly trained soldier. Suddenly, you have two, then four, then eight, then sixteen troops. A single starship transporter pad could create an entire battalion of troops in a day.
Replicators
Another criminally underused tech. Given proper utilization and enough workers (a problem solved through the rapid cloning tech from above), a proper replicator-based industrial complex could churn out insane amounts of materiel for a war effort. We're talking about replicator systems that could replace the loss of an entire fleet in a week or less.
Then there are the one-off techs. The Genesis Device, Trilithium Missiles (the actual star killer from ST: Generations), Iconian Gateways, all the myriad methods of time travel, Isokinetic Cannons, genetic modification (like the Augments or Bashir's mods), the modified TR-116, all sorts of things we see once or twice and never again.
This is why the writers of Trek have them acting like neo-hippie pacifists all the time. If you placed Starfleet under the command of someone with Military Competence, gave them access to all the fun toys, and let them build up the infrastructure, Star Trek can become a VERY scary universe to go up against. They could easily steamroll the entire Milky Way Galaxy (yes, even the Borg and Species 8472) and could utterly destroy just about ANY other fictional universe's forces with ease.