Anything with a substructure has excited states. Molecules, atoms, nuclei all can absorb photons which causes them to make a transition to an excited state. Conversely, when they jump from an excited state to a lower energy state, energy is emitted in the form of photons. Can proton and neutrons (having electrically charged quarks inside them) have such excited states?
Yes, nucleons have excited states and resonances. The two middle delta baryons are the most well-known with spin 3/2 instead of 1/2 for the proton and neutron, followed by the Roper resonances. There is a fairly long list of such states by now, running up to 2700 MeV and 13/2 spin for nucleons.