Light wave and sound wave are of different nature. The former is electromagnetic, whereas the latter is mechanical. Unlike sound wave, which needs a medium for the wave to travel because the propagation is by means of mechanical vibration of the medium particles (molecules), light wave travels by means of mutual interaction of the electric and magnetic field components of the wave.
Since electric and magnetic fields can exist in vacuum, this makes electromagnetic waves be able to travel in space from the sun to the earth.