Between electrons and nuclei, and between atoms or molecules or
ions, the nature
of forces of attraction (and repulsion) are wholly electrostatic.
•So, electrostatic potential energy is the energy in the
substance due to the attractions between the electrons and the nuclei in the atoms, the attraction between the atoms in the molecule and the attraction between the molecules themselves, if the compound is covalent.