Light, despite being a wave, can travel in a vacuum because it does not require a medium to propagate. This property of light is one of the fundamental aspects of electromagnetic waves.
In classical physics, light is described as an electromagnetic wave consisting of oscillating electric and magnetic fields. These fields can interact with charged particles, such as electrons, but they can also propagate through empty space without the need for a physical medium.
Unlike mechanical waves, such as sound waves or water waves that require a material medium (such as air or water) to travel, electromagnetic waves can move through a vacuum because they are self-propagating disturbances in the electromagnetic field. This means that light can travel through the vacuum of outer space or any other region devoid of matter.
It was through experiments and observations, such as those conducted by James Clerk Maxwell and later confirmed by the famous Michelson-Morley experiment, that led to the understanding that light is an electromagnetic wave and can travel through a vacuum.