You've made three requests:
- kill every organic thing on earth
- death needs to be instantaneous
- infrastructure needs to stay unharmed
I'm pretty certain you can't have all of those without magic
The major problem you have is endolithic organisms, which have been found as deep as 3km down and the only reason we haven't found anything deeper is because looking is extremely difficult and expensive. Most likely you'll find stuff deeper still. Delivering enough energy to sterilise rock at that depth without blasting the surface of the planet off is basically impractical, even if you did have a way to attack from all directions at once.
- If you allow for a non-instantaneous effect, then you could seed all the planets with self-replicating weapon systems designed to hunt down and kill all different colors and flavors of life.
- If you need to kill everything, you'll have to resurface the planet. All infrastructure on the affected planet will be lost. Other infrastructure may survive.
If you're prepared to use handwavium-levels of power and technology, then you could almost imagine some kind of weapon system that could precisely fire perfectly synchronized pulses of some kind of particle and antiparticle that only interacted weakly with normal matter. Once upon a time, Weakly Interacting Massive Particles were a dark matter candidate and something predicted by supersymmetry, but alas no-one ever found a suitable WIMP and SuSy seems to be DOA.
Lets imagine you did manage to create such a thing. Instead of exploding like a bomb, you use massive handwavium particle cannon (which cannot use electromagnetic acceleration!) to produce these perfectly synchronized pulses of WIMPs and anti-WIMPs, shooting them out at high relativistic speeds. Crucially, the first pulse travels ever so slightly slower than the second pulse of antiparticles. As they don't interact via the strong or electromagnetic forces, most of the particles will shoot clean through the Earth, barely noticing it. When they reach the far side, the faster antiparticle burst catches up with the slower particle burst and the two annihilate in a big flash of gamma rays and maybe other exotic radiation.
Fire off as many pulses as deemed necessary, at just the right angles and speeds and intervals such that the whole surface of the Earth and a sufficient amount of the deep crust is simultaneously bathed in deadly radiation that seemingly materializes from nowhere.
Doesn't strike at lightspeed, but may 99% of C is good enough. Given the unwillingness of the particles to interact, such an attack is likely to be highly inefficient and also require exceptionally high levels of technological capability. Just wasting a planet with a shower of antimatter or a relativistic strike would be much more straightforward.
Note: The original idea for this was on the Orion's Arm worldbuilding project, and called "Ghostlight". The page has since been memoryholed, presumably due to project-internal discussions and retconning of things not deemed to be strong enough scifi. No cached copies of the page remain that I could find.