Can Magnetars destroy planets? Magnetars are the most magnetic things in our universe. Because of how powerful their magnetic fields are, they could split every single atom apart from each other in our body.

Because of this could they destroy planets (rocky or not)? If so, how close would the planet have to be?
Perhaps one way of answering this is to note that the (approximately) dipole magnetic fields of a magnetar fall off radially as something like $r^{-3}$. So at the magnetar surface the fields could be of order $10^{11}$ Teslas (at a maximum), but these are reduced by a factor of $\sim 8$ at 2 magnetar radii, a factor of $\sim 27$ at 3 magnetar radii etc.

Now given that the radius of a magnetar is going to be $\sim 10$ km, then the fields die away pretty quickly. 

So let's say the Earth orbited a magnetar. The field strength at $1.5 \times 10^{11}$ m is going to be $\sim 10^{11} \times (10^4/1.5\times10^{11})^3 =  3 \times 10^{-11}$ Teslas - much smaller than the Earth's magnetic field.

To put this in context. The field at the surface of a small neodymium magnet are of order 1 Tesla and they don't disrupt your atoms when you pick them them up. To get a field this strong from a magnetar you would have to get to within about 50,000 km of it. The synchrotron radiation field would have fried you before then and any planet would have been ripped apart by tidal forces about an order of magnitude further away. The Roche limit given by
$$ R_{Roche} \sim 1.26 R_1 \left(\frac{\rho_1}{\rho_2}\right)^{1/3},$$
where $\rho_1$ is the density of the neutron star ($\sim 3 \times 10^{17}$ kg/m$^{3}$), $\rho_2$ is the density of the Earth ($\sim 5500$ kg/m$^3$) and $R_1$ is the radius of the neutron star (10 km). This yields $R_{roche} = 480,000$ km.