Doctors say the pneumonia vaccine is a good idea for most people at some point in their lives—but not everyone should get the shot.