Two very interesting but quite different questions here.
Lasers can be built at such scales that you could fire them at other star systems and deliver energy. Robert L Forward did the calculations for an interstellar starship powered by massive laser driven lightsail. Of course to power it, you needed terawatts of energy to drive the laser, and a lens over a thousand kilometres in diameter to focus the laser on the target spacecraft light years away. Scaling the idea even further, you can create a Nicoll Dyson Beam and destroy entire solar systems across the galaxy
This is strategic level weaponry, and requires either a cooperative target, like the laser sail starship, or a slow moving and predictable target, since moving at the speed of light a Nichol Dyson Beam fired from Earth will still take 4 years to reach Alpha Centauri.
For more "tactical" level weapons, such as ones needed for spaceship to spaceship combat in the solar system, you can build huge "Ravening Beams of Death" (RBoD) which can vaporize metals and ceramics in milliseconds at a light second range, illuminate and scorch targets out to a light hour, but in any practical sense, the maximum combat range of a laser being used to target another spacecraft or accelerating object is one light second.
FEL RBoD tuned to fire X-rays. To get the idea of scale, the accelerator ring is a kilometre along the long axis Details on the Atomic Rockets Conventional Weapons page
This allows the firing platform to identify targets 300,000 km away, take aim and fire, with only a one second delay between firing the weapon and the beam striking the target. This means there is only a second delay to see effects on the target, and you can quickly adjust for the target's attempt to break target lock.
For RKKV's (relativistic kinetic kill vehicle), the problem is much different. The vehicle is moving at close to the speed of light, in order to deliver the maximum amount of energy into the target.
Since it is moving at close to the speed of light, it is essentially coming right behind its own light cone, and essentially invisible to the target. Even if you somehow see the RKKV on its inbound run, you only know its position in the past, and not its current position. Trying to aim at it with any sort of conventional weapon would simply be a wild guess.
RKKVs do have one weakness, however. The vehicle is moving at such a high speed that even striking a hydrogen atom in deep space would release an immense amount of energy. If it seems that being attacked by RKKV's is a possibility, then putting shells of dust or gas around the solar system and target planets would cause the RKKV to be heavily damaged or even destroyed well in advance of it reaching the inner solar system. The sudden release of energy in deep space as these things run into the shells of gas and dust would provide warning that something is happening, and provide a clue to the direction of the attack, allowing you to send a counter wave of your own RKKV's, or fire a Dyson Nicholl beam back at the attacking star system.