What effect does a light ray cause on an electron to make it excited. How a electron absorb energy?
It is not an electron, but the atom it is associated with that absorbs energy. A free electron is incapable of absorbing a photon due to the requirements of energy and momentum conservation. In an atom, however, an electron can absorb a photon and jump from one bound state to another (or leave the atom completely).