There are two types of waves: transverse and longitudinal. Light is a transverse wave, therefore its oscillations are perpendicular to the direction of motion. While sound is a longitudinal wave so its oscillations are parallel to the direction of motion. Moreover, light along with all other EM waves do not require a medium to travel, hence it can pass through space. While, sound requires a medium to travel and can’t pass through space.