An ion is formed when an unstable atom gain or donate electrons in its outer energy level in order to be stable Whether an atom gain or donate electrons depend on the relative energy required to donate or gain extra electrons ie