Is a parent compelled by Halacha to vaccinate her child if it can be statistically proven that, without the vaccine, the likelihood of the child contracting the disease that he is being vaccinated for is still very minimal (mi'ut shaino matzuy)?
R. Ya'akov Emden (מור וקציעה או"ח ס' שכח) suggests that one can only force someone to take medication when there is no counterclaim from the patient or another physician. However, if the patient or the physician feel that the medication, will not work, we can't force him. Furthermore, if he claims that he doesn't want to take the medication because it will cause him more harm than good, we cannot force him to take the medication. However, this only applies to medicines that are taken for internal conditions and the medicine is only based on estimates. Medicines that are taken for external conditions, where the data is readily available, is considered a certainty and one may not oppose the opinion of the physician.
Rabbi Joshua Flug reasons that R' Emden might agree that nowadays, many medicines for internal conditions are also treated like the external because we have means of knowing their effectiveness and it is not based on estimates. He further reasons that unless a vaccine can be proven safe, it cannot be given against the patients will, as the patient can claim he is refusing out of fear that it will harm him.
Since those who wish not to take vaccines frequently say they believe it to be unsafe to take them, and may even have other physicians (even if these are fringe physicians) supporting them, it seems they cannot be forced.
Rav Moshe Heinemann explains in his sefer on Medical Ethics (1:4)
The main issue with getting vaccinated which we need to consider is not so much the question for yourself – if you don’t mind getting the disease, then that’s your choice. You have a right to make that choice. However, the main question is spreading the disease to someone else who has a compromised immune system. If you contract a disease which spreads to such an individual, then you’re damaging them and putting the other individuals in a life-threatening situation. Seventy years ago, we didn’t have as many people with compromised immune systems who would be in danger by you not getting vaccinated. Consequently, the entire question of vaccination has changed into putting other people in danger. If a pregnant mother develops German measles, then it could be very dangerous to the fetus. The child might have trouble hearing, have compromised eyesight, all kinds of things which affect the child which wouldn’t have happened if other people were vaccinated for measles. Therefore, I say there is an obligation to receive vaccinations.