Why are vaccines important for preventing the spread of infectious diseases?

Why are vaccines important for preventing the spread of infectious diseases?