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.