Why does not sound travel in vacuum but light does?

The basic difference between a sound wave and a light wave is that the former is a mechanical wave while light is an electromagnetic (EM) wave. Mechanical propagate by the actual displacement of physical particles. Each particle oscillates about its mean position in a synchronized manner to cause energy propagation in a mechanical wave pattern. In case of EM waves, electric and magnetic fields ‘oscillate’ about their mean zero in mutually perpendicular planes and cause wave motion. Mechanical waves require particles to oscillate and enable it to move on. Hence, they require some medium (to provide these particles) for travel. EM waves consist of only change in electric and magnetic fields. So, they do not need any medium for propagation.