Wouldn't you need to solve the n-body problem to hit a planet (earth) from many light years away with a rock? And to do this without exact knowledge of planetary bodies in our star system. And even if you could, a stray hydrogen atom hitting your rock early on would make it miss its target by some light hours. So you better account for every speck of dust on the way and everything with gravitational pull on your rock. An all the quantum fluctuations..
I would even wonder whether the space itself is fine grained enought to precisely target stuff light years away.