Warp strafing
Warp strafing is a theoretical battle tactic invented by Star Trek fans. The tactic has not appeared in canon.
Theory
In the proposed tactic, a starship light-years away from it's target sets a course to fly past an enemy vessel. It then approaches the target at warp speed. When the enemy starship enters weapon range, the starship fires its weapons as it flys by the target, delivering a full salvo while the enemy is unable to return fire.
Usage
Warp strafing has never been observed in any Star Trek episode. If it were a useful battle tactic, it would likely have been observed in the many thousands of hours of footage of Star Trek.
Often Elaan of Troyius is cited as an example of a canonical warp strafe. This argument rests on the assumption that because the Klingon vessel is at warp, and the Enterprise at impulse, the Enterprise must be many times slower. This argument is wrong. Sulu counts down the distance between Enterprise and the Klingon vessel in tens of thousands of kilometers over several seconds, indicating the relative velocity between the starships is less than c. In other words, this incident is just like any other warp battle in Star Trek, with one starship pursing another in warp.
The word impulse in Star Trek does not necessarily mean slower-than-light, as evidenced in several examples including Best of Both Worlds Pt. II where the Enterprise-D drops out of warp at the edge of the solar system and shortly enters Earth orbit, necessitating faster-than-light impulse. Elaan of Troyius is not an example of a true warp strafe, which would involve one starship at rest or near rest relative to another approaching faster than light.
The Picard Maneuver is sometimes cited as an example of warp strafing. It is not a warp strafe, however, as the Picard Maneuver specifically involves dropping out of warp before firing weapons.
Physics
The critical problem with warp strafing is relative speed, a topic covered in Junior High School physics courses. Suppose car A approaches car B while at 50 km/h. Further suppose car B is traveling at 49 km/h in the same direction. The relative speed between car A and car B is 1 km/h.
However, a car traveling at 100 km/h compared to a car traveling at 20 km/h in the same direction is truly approaching at a relative speed of 80 km/h.
This is important because Star Trek starships of every faction have difficulty locking onto relatively slow and predictable targets. Attacking a vessel traveling many orders of magnitude faster than what your weapons directors are designed for and capable of will not result in firing solutions.
In short, all evidence Star Trek ships could not hit their targets if they attempted a warp strafe as a relative velocity above lightspeed is well beyond their weapons' targeting capability.
Furthermore, even if we generously accepted the stated ranges of as much as 300,000 km for Star Trek weapons, a starship attempting to warp-strafe a sublight target would be in range for no more than two seconds and probably far less (since warp-driven starships are capable of traveling at hundreds or thousands of times the speed of light). An attacker would only be able to use a tiny fraction of its firepower on each fly-by, meaning that it would probably take hundreds or thousands of strafing runs to signficantly affect a shielded target.
Starfleet Captains seem to understand these limitations, as they never attempt to warp strafe.
Stationary Targets
Warp strafing would be ineffectual against stationary targets. If a target were stationary, the attacking starship could simply sit and fire torpedoes without the strafe. Secondly, stationary and heavily defended targets such as battle stations, weapons platforms and fortified planets could track the attacker with faster-than-light sensors. Any vessel attempting this tactic would move in a predictable straight line, a so-called "attack run." Unless the attacking vessel further complicates the attack run with changes of course and acceleration, the defender could track the attacking vessel just as easily as the attacking vessel could track it, with the added advantage of being stationary and using more power for shields and weapons.
Conclusion
In summary, warp strafing requires the attacker have far more advanced propulsion, sensor and weapons technology than the defender. If this was the case, it is likely a more conventional approach would succeed just as well. The attacker could simply stay at stand-off range and pelt the defender with missiles, without the need for a dangerous approach.