An electromagnetic wave is perfectly happy to do that. An electromagnetic wave, although it carries no mass, does carry energy. The energy carried by an electromagnetic wave is proportional to the frequency of the wave. In other words, we split up the electromagnetic spectrum based on frequency. Visible light, for example, ranges from violet to red.
Visible light makes up a very small part of the full electromagnetic spectrum.
The energy in an electromagnetic wave is tied up in the electric and magnetic fields. A good measure of this is the intensity of the wave, which is the power that passes perpendicularly through an area divided by the area.