The Electric Dragon does not spawn, you have to breed it. The combination can be found on the breeding dragons page.
When riding click F to use your primary attack lightning ball which shoots a lightnig that does a 10=30 damage click G to use you r scondary attack and start a thunderstorm.
The Electric dragon is fed with Blaze rods. It needs five Blaze rods every week, otherwise, it will become Feral, and hostile, as all combination Dragons are sterile, killing it will not give you an Egg. Multiplayer has an exeption for this: see Feeding Dragons.