Sound cannot travel through a vacuum, because sound requires a medium to form and travel. Despite what science fiction movies show, there is no sound in space.
Sound is a compression wave. When sounds are generated, molecules are compressed, and this compression propagates in the form of a wave. Sound travels faster through denser items. As a result, the speed of sound is significantly faster in water and in solids than it is in air.
The temperature of air also has an effect on sound. At higher altitudes, where the air is colder, the speed of sound is lower than it is at sea level. Airplane manufacturers have to account for this when designing aircraft, as flying too close to the speed of sound can cause a plane to stall if it is not designed for supersonic travel.
A chief complaint about science fiction cinema and television is that explosions and other actions have sounds associated with them. Space is an almost perfect vacuum; the concentration of hydrogen and other elements is low. Despite decades of complaints from scientists and fans interested in realistic portrayals, filmmakers still rely on sounds in space to increase drama. However, "Firefly" and some other TV series and movies correctly portray the silence of space.