Gamma Ray Burst
Have the planet and its star, traveling around the Galaxy, come within a couple light-years from a black hole that's eating away a star.
A nice sequence of gamma-ray bursts, near enough and long enough to sterilize the planet. Of course, an intensity sufficient to kill Archaea in deep mines or at the bottom of an ocean will wreck the atmosphere too.
As per comment, what if the GRB source is in the planetary system itself? I am not an astrophysicist, but it seems unlikely:
- the secondary star of a binary system goes nova. Possible, but if the flash doesn't boil off oceans and atmosphere, sterilization down to bacteria won't happen. Even if the surface reaches 200 °C for several days, heat will seep only slowly inside the crust. Deep mines will probably remain habitable for insects, not just bacteria. And if we lose the atmosphere, the planet won't be viable afterwards.
- the secondary star collapses into a neutron star or black hole. The problems now are: (a) the gamma radiation from neutron stars is apparently emitted along the rotation axis, which in most solar systems is normal to the ecliptic since both phenomena stem from the angular momentum of the original gas cloud which originated the solar system. So, the GRB will never hit the planets; (b) if we posit a different mechanism, e.g. X-ray emission from an accretion disk, said accretion disk would almost have to come from the primary star. Which means that the black hole's grasp somehow reaches the star's atmosphere; a fortiori, the planet in its orbit is a goner.
We could still have a gas-giant-massed black hole at cometary distances, eating away a superdense Kuiper belt or "smoke ring" (like the one around Tau Ceti). This would result in a very strong X-ray emission; will it be enough to sterilize a planet? Maybe.
A more handwaved explanation: dark matter exists and it weakly interacts with baryonic matter. The planet passed through a large and dense clump of dark matter, that seeped through everything from the stratosphere to the molten core, subtly altering electrochemical and nuclear properties of all matter. This is not too hard on most types of matter (some crystals shatter, some elements decay at slightly different rates, but that's all), but living matter is based on finely balanced energy levels and innumerable chemical reactions that have to blend together just so. All DNA and RNA based molecules simply broke up, killing all life within a few seconds. A lingering core contamination could still be detected from slightly skewed geoneutrino ratios.
These are biological machines, much more efficient and resistant than evolved bacteria. They will outcompete everything else, resisting to conditions more extreme than naturally evolved organisms can. Over a period of several thousand years, they'll infiltrate everything, and exterminate all competition. They'll not be DNA-based, but still have mechanisms to avoid random mutations, and be able to utilize different energy sources; and of course they will have some kind of count-down mechanism to have them die off after a certain time.
Just seed the whole planet with the beasties, and wait.