Such explosion is of course practically impossible in reality, but from the point of view of modern physics this would not break any absolute conservation laws:
- Earth is almost electrically neutral like everything such big. If you take into account the relatively small charge, you would need to leave some electrons for negative charge and positrons or protons for positive charge, but this would not make much difference.
- Baryon number (B) and lepton number (L) conservation would forbid transformation of normal matter into photons, but this conservation laws are not absolute. Sphalerons in the Standard Model, if not grand unification theory, let change them, conserving only B-L. So you would need antineutrino (B-L=0-(-1)=1) for every neutron (B-L=1-0=1). Electrically neutral pair of proton and electron has B-L=0.
- B-L also probably is not absolutely conserved. For example if neutrinos have Majorana mass, neutrinos are at the same time antineutrinos, so L=1 can transform into L=-1.
Energy released would be $E = m_E c^2 = 5.97219 × 10^{24}\,\mathrm{kg} × (299792458 \,\mathrm{\frac{m}{s}})^2 = 5.36753 × 10^{41}\,\mathrm{J}$. Earth volume is $1.08321 × 10^{21}\,\mathrm{m^3}$, so energy density would be $U = 4.95520 × 10^{20}\,\mathrm{\frac{J}{m^3}}$.
Assuming that the photons will form Planck radiation, from relation $U = \frac{\pi^2}{15} \frac{k_B^4}{\hbar^3 c^3} T^4$ we get $T = \sqrt[4]{\frac{15}{\pi^2} \frac{\hbar^3 c^3}{k_B^4} U} = 8.996 × 10^{8} \,\mathrm{K}$.
From Wien's displacement law, $\nu_\max = 5.879 × 10^{10} \,\mathrm{\frac{Hz}{K}} × T = 5.289 × 10^{19} \,\mathrm{Hz}$. So typical photon has energy of $E = h \nu_\max = 3.504 × 10^{-14} \,\mathrm{J} = 0.2187 \,\mathrm{M}e\mathrm{V}$. This is less than the rest energy of electron ($m_e c^2 = 0.510998910 \,\mathrm{M}e\mathrm{V}$), so pair creation is not important. (This comes from mean density, $5.5 \,\mathrm{\frac{g}{cm^3}}$. Actually we should take into account density of different parts. The density of the atmosphere is $0.0012 \,\mathrm{\frac{g}{cm^3}}$ or less, and of the inner core—up to $13\,\mathrm{\frac{g}{cm^3}}$. But this gives no qualitative difference—atmosphere still gives gamma rays or hard X-rays (and total energy from it is neglegible), and core has no pair creation.)
The flash would last $2 r_E/c$ or $0.04259 \,\mathrm{s}$ (the difference between time of arrival of the light from the nearest and furthest points of Earth).
Space-time will not be destructed as this is relatively low energy. Around Planck energy, about $10^{22}$ MeV, or even few orders of magnitude lower, strange things might happen, for example transition to other vacuum, maybe with other number of observable dimensions.
Gravitational binding energy is of the order of $E_g \sim \frac{G m^2}{r}$ (details depend on inner structure). For example for Earth $E_g \sim 3.728 × 10^{32}\,\mathrm{J}$. Earth would be totally destroyed by explosion of another Earth for $E_g \sim E s / S = \frac{E \pi r_E^2}{4 \pi R^2}$ ($s = \pi r_E^2$ — surface of Earth cross section, $S = 4 \pi R^2$ — surface of a sphere on which energy is dispersed for given distance) or for stream of the order of $I_1 = \frac{E_g}{\pi r_E^2} \sim 3 × 10^{18}\,\mathrm{\frac{J}{m^2}}$ or for distance not more then $R_1 \sim \sqrt{\frac{E}{4 \pi I_1}} \sim \frac{1}{2} \sqrt{E/E_g} r_E \sim 1.2 × 10^{11}\,\mathrm{m} \sim 400 \,c\cdot\mathrm{s}$. Moon and other inner planets have less binding energy. This means that Moon (distance $3.844 × 10^{8}\,\mathrm{m}$) would most definitely be destroyed and inner planets should partially survive (distance comparable to distance to the Sun, $1.496 × 10^{11}\,\mathrm{m}$, and probably some energy would be lost). Jupiter will survive. It is further and much bigger. Sun is also big enough to survive. Calculations for individual planets, moons, planetoids... would take too much time.
Planetary scale destruction is something of the order of $I_2 = \frac{1000\,\mathrm{\frac{kcal}{kg}} × 1000\,\mathrm{km}}{1000\,\mathrm{\frac{kg}{m^3}}} \sim 4 × 10^{9} \,\mathrm{\frac{J}{m^2}}$ (1000 km of water like-material heated by 1000 K or something equivalent). $R_2 \sim \sqrt{\frac{E}{4 \pi I_2}} \sim 7 × 10^{15}\,\mathrm{m} \sim 0.3 \,\mathrm{ly}$
Medium irradiation is something of the order of $I_3 = 1 \,\mathrm{\frac{J}{m^2}}$ or 0.1 Sv to the depth of 1 cm (Gamma ray absorption coefficient is of the order of 1/cm, so most energy will be absorbed by the surface 1 cm). $R_3 \sim \sqrt{\frac{E}{4 \pi I_3}} \sim 2 × 10^{20}\,\mathrm{m} \sim 2 × 10^{4} \,\mathrm{ly}$
Typical [real] gamma-ray bursts are observed to have a true energy release of about $10^{44}$ J, or about 1/2000 of a Solar mass energy equivalent—which is still many times the mass energy equivalent of the Earth (...) [and focus their] energy along a relatively narrow beam.
(From Wikipedia)
So they are a few orders of magnitude stronger. Probably they release substantial part of the rest energy of stars in something connected with black holes. You can read about gamma-ray burst to get idea of how it would work in the area, where irradiation would be the biggest effect (destruction of surface organisms on one side of a planet and ozone layer).
Values of used constants:
- $\pi = 3.14159265$
- $c = 299792458 \,\mathrm{\frac{m}{s}}$ (exactly)
- $h = 6.62606957 × 10^{-34} \,\mathrm{J s}$
- $\hbar = \frac{h}{2 \pi} = 1.054571726 × 10^{-34} \,\mathrm{J \cdot s}$
- $k_B = 1.3806488 × 10^{-23} \,\mathrm{\frac{J}{K}}$
- $1 \,\mathrm{M}e\mathrm{V} = 1.60217657 × 10^{-13} \,\mathrm{J}$
- $G = 6.67384 × 10^{-11} \,\mathrm{\frac{N \cdot m^2}{kg^2}}$
- $m_E = 5.97219 × 10^{24}\,\mathrm{kg}$
- $r_E = 6.3844 × 10^{6}\,\mathrm{m}$