Every light absorption has a preceding light emission. Electrons emit photons after an excitation. And that is where we should start.
These electrons are elementary electric charges and are, last but not least, elementary magnets. To the photons they bequeath both the electric and the magnetic field. And they do so in perfect harmony; photons have very different energy contents, but the ratio of the electric to the magnetic field is always a constant.
During absorption, however, the photons have almost no chance of hitting an electron that is in exactly the same excited state as the emitting electron. In addition to the electron being raised to a higher energy level in the atom, there is often re-emission of infrared photons and excitations within the atomic compound.
In fact, light has an electromagnetic field, so it has an electric field which interacts with atoms's electrons.
More than that. A photon interacts with both its electric and magnetic field with the material it hits. The best example is the polarised photons that emerge from an antenna rod. If these photons hit a straight antenna rod, we speak of an electrical antenna, but if they hit a circular antenna, we speak of a magnetic antenna.