Whether power is used in a mechanical environment or an electrical environment, the definition of power is still the same. Electrical power is the rate, per unit time at which electrical energy is transferred by an electric circuit. It is the rate of doing work . An important aspect of any electronic or electrical circuit is the power associated with it. It is found that when a current flows through a Resistor, electric energy is converted into heat. This fact is used by electrical heaters which consist of a resistor through which current flows.
Simply, electrical energy is the ability of an electrical circuit to produce work by creating an action. This action can take many forms, such as thermal, electromagnetic, mechanical, electrical energy can be both created from batteries, generators, dynamos, and photovoltaics, etc... or stored for future use using fuel cells, batteries, capacitors or magnetic fields .