"The same way pilots hit moving targets today. You predict where the target will be when your bullet arrives, then aim for that spot. It's called "leading the target". Anyone who's had to fire at a moving target knows about that."
Not a pilot myself, but I'm aware of this method (I blame too many computer games

). Although the problem would be more difficult to over come (at least if you're dogfighting in a plane you can actually see where the enemy plane is at the moment you press the trigger) some sort of computerised targeting system would no doubt be able to predict the likely position of the target based on its known speed, heading and range.
But what if the time lag is longer, say minutes, hours or days, during which time the location and heading of the target could drastically change? Distances in space are h-u-g-e. Even if your weapons travel to the target at the speed of light they could still take hours to reach it even if you're just trying to hit something in the same star system. If the target isn't moving in a predictable manner it would be near impossible to hit without some sort of independent ability to home in and overcome any defences the target might have, and then of course you have problem of packing the engines and fuel into a weapon and making it fast enough to arrive at the target quickly enough and with enough speed, manouevrability and machine based cunning to correct its course, evade defences and hit the target.
Over greater distances it could become ridiculous. Imagine trying to shoot down a plane by trying to predict where it might be next Thursday.
Hmm, all this is getting my creative juices flowing. Fun!