Electromagnetic excitation of baryon resonances in the quark model