How does electrical energy differ from electromagnetic energy?
It doesn't necessarily differ at all. These could refer to exactly the same thing, but one has to look at the situation. Details below...
When one speaks of electromagnetic energy, it might be assumed you were referring to the energy of electromagnetic radiation. If so, this is the energy carried by electromagnetic waves through space, and is proportional to the frequency of the radiation.
When one refers to electric energy, the most common application is likely to be to electric circuits and batteries or other sources of emf (generators, solar cells, etc). These sources could produce electric current by electromagnetic means, as in a generator.
That said, in both cases we are speaking of the energy associated with moving electric charge - whether it be oscillating electrons producing those electromagnetic waves, or oscillating electrons in an AC circuit, or the continuous motion of electrons in a DC circuit.
So, as mentioned above, the only real difference might be based on the situation you are considering.
I hope that helps a bit, because the difference is a subtle one.