During the battle to regain DS9 (Sacrifice of Angels), each of the Starfleet fighters phaser shots were doing as much damage (size of fireball) to a Cardassian ship, as one of the main phaser strips on a Galaxy class firing a equal number of shots at a similar target.
That is, apparently none...
Similarly, the Dominion ships were able to light up huge gasoline explosions every time they hit the shields of DS9 in "Call to Arms", but apparently none of the shots resulted in any appreciable damage to the station. Certainly there were no physical marks afterwards, either on DS9 or on those Cardassian ships.
If your best weapons barely dent the enemy, then there's no point in fighting at long ranges. You need to crowd your opponent and pummel him slowly to death, just like in a big gang fight in a slum where nobody can afford a gun, or in 14th-18th century naval warfare.
Range only began to play a role in naval fighting around WWI when the possibility first arose of seriously hurting or even crippling the enemy with just one salvo. But Trek bears quite a bit of resemblance to pre-WWI style in other respects, too: the absence of aircraft for spotting let alone fighting, and the lack of radar or much in the way of radio, either. The FTL sensors and subspace radios basically amount to horizon-scale situational awareness and communications, in the scale of space...
What Trek has over WWI is fire control. pre-WWI guns had the range to engage at great distances, but it would have taken a miracle to score a hit at that range. Combining this with the fact that a battleship's shell had slim chances of going through another battleship's armor made it perfectly sensible to sail very close to the enemy and to pummel him with a range of guns, starting with the big ones but bringing all sorts of peashooters into play as the range diminished. It also made it sensible to launch all ships in one big mass into an unholy melee, so that even the wimpiest peashooters aboard the smallest tin cans could contribute. Trek looks pretty much like that - just with better targeting.
Yeah, it's the 24th century by DS9 era. They should be able to hit targets at great ranges.
in TNG, they can hit precise targets from orbit.
It stands to reason that they can hit a ship from a similar distance.
I'm not asking for such precision targeting at those long ranges that you can hit a specific window on a ship, just make sure you collide with the enemies shield or hit the vessel square on the silohuette.
Pummeling enemies works great IRL because you have to reach the enemy and you have to recoil your fists to deliver another blow.
It makes no sense to pummel at close range with a ship if your weapons have targeting accuracy at range and the ability to travel far distances with your projectiles. In fact, that's how you should be fighting. The only advantage of fighting at close range is the ease to target sub systems accurately and the ease to dodge around the target to get a clear shot if they rotate their vessel to present their stronger shield side to you. The bad part about close range combat in ships is that it's easy for the enemy to hit you, and you are a huge target silohuette for the enemy.
It makes no sense for space battles to be fought at close range such as DS9 battles. I know the director did it for dramatic license, but it's quite illogical when you think about it.
Think about how easy it is to shoot a person with a pistol within the same room of a average sized room. Now imagine having to shoot the same guy with a pistol at 500 feet away. Machine targeting could make that kind of shot a sinch and consistant in accuracy of hits. Humans would take forever to get even resonably close and have a reliable hit pattern.
Computer aided targeting systems in ST should be quick, accurate, and consistant, even at super long ranges.