Light is an electromagnetic wave. Electromagnetic waves are transverse waves that can transfer energy across empty space without the need for a medium with atoms or molecules in it.
There are two broad categories of waves, electromagnetic and mechanical waves. Mechanical waves require the presence of particles, such as atoms and molecules, in order to transfer energy from one point to another. Electromagnetic waves, on the other hand, do not require the presence of a medium with particles in order to transfer energy.
Light is the visible part of the electromagnetic spectrum, which comprises a range of different wavelengths of electromagnetic waves, most of which are not visible to the human eye. These invisible electromagnetic waves include X-rays, gamma rays, and infrared and ultraviolet rays. Since light is an electromagnetic wave, it does not require a medium to propagate. This is the reason why we receive light from the sun and can view distant stars and galaxies at night despite the vacuum of space.
All electromagnetic waves, including light, are transverse waves. Waves are further classified into two types (transverse and mechanical waves) depending on the direction of oscillation of the energy relative to the direction of the motion of the wave. Transverse waves, such as light, have their energy, vibrate in a direction perpendicular to the direction in which the wave is traveling.