What would a large imbalance of protons and electrons actually do? Over on worldbuild.se there have occasionally been questions where the answer is that there would be a sudden large imbalance between the number of protons and electrons. The answers have also stated that the results would be apocalyptic to a degree that I find unintuitive (and it's quite possible that I just don't have good intuition for the electromagnetic force). This is the most recent, and it states that the magnetic force caused by having $4\cdot10^{25}$ extra electrons on Earth would be enough to rip apart the sun. This comes from removing a proton from each atom in 4 kg of iron, and if we instead had 4 kg of antimatter we'd get $E=mc^2=8\cdot c^2=7.19e17 J$, which is comparable to the explosion of Krakatoa. Bad, but nowhere near enough to rip apart the Earth, let alone the sun.
So what would actually happen with a sudden, very large imbalance between protons and electrons in an area? Would the resulting electromagnetic force really result in more energy delivered than if the mass had been converted into antimatter?
 A: The claim that it could rip apart the sun is totally false.  This is equivalent to a pretty standard textbook problem: what happens to a conducting sphere when placed in an electric field?  Sure, at first the protons and electrons move relative to each other, but that builds up a field that counteracts the applied field extremely quickly.  In practice, the sun's electrons would move an immeasurable amount towards the earth, at which point they'd cancel out the applied field.  I'm too lazy to work it out, but if you asked me if it were bigger or smaller than a Planck length, I'd probably take the under.
For energy, you're turning the Earth into a spherical shell of charge, which has stored energy $\frac{Q^2}{8\pi \epsilon_0 r}$.  Plugging in, this gives ~3e16 J, or the equivalent of the rest mass of ~0.3 kg.  Note that there is nothing wrong with electrostatic energy being larger than the rest mass, though - the energy is stored in the field, and it's perfectly reasonable for it to take a lot more work to move an electron towards other electrons than the electron has rest mass.  If you ever let the electron go, it would fly away at relativistic speeds, but that's allowed.  My favorite example here is the Van de Graaff generator at the Boston Museum of Science, which builds up potentials of ~2 million volts. Since the rest mass of an electron is half an MeV, that means it takes 4 times the rest mass of an electron of work to add each electron to the generator once it's charged.
