Doctors take a vow to "first do no harm". Advising patients to forgo a quick and relatively painless procedure like vaccination which can prevent a wide variety of fatal, crippling diseases is putting their patients lives and welfare in danger, and is a direct violation of the oath they swear to uphold as physicians. Any doctor who refuses to vaccinate should be held to the same standard of accountability as one who refuses to perform a necessary surgery.
Doctors shouldn't recommend something with potentially serious consequences. Vaccination affects not only the family but others in the community who can't get vaccinated due to health issues. A medical professional recommending not to get vaccinations is irresponsibly and potentially dangerous to the whole community. While discussing the pros and cons is fine, actually endorsing the anti-vaccination movement is irresponsible.
Unvaccinated children and adults are a health risk to those too young to receive vaccines. They are also carriers of some types of diseases which should have been wiped out, but aren't due to the anti-vaxxer movement. Unless ingredients in the vaccine are known to be harmful to the individual, vaccines should be given and doctors should not advise against them unless there's a direct risk to their patient.
In my opinion the relationship between a doctor and patient is a confidential and sacred trust, and legal interference should be kept to a minimum. A code of ethics should mandate that if a doctor holds an opinion outside the medical mainstream, while that doctor can advise a patient accordingly, s/he is responsible to inform the patient that opinion may vary on the topic of vaccinations.
No, doctors should not face penalties if they, in good conscience, advise against vaccines. There may be cases when it is not beneficial for an individual to be injected with a vaccine. These instances should be treated on a case-by-case basis. If, however, certain doctors refuse to vaccinate altogether and show a track record of patients who suffer from this refusal, then those doctors need to face penalties. But again, each doctor needs to be evaluated on his or her own merit based on overall success with patients.