Here's the full CDC brief[1]. The short version: your religious belief generally has to be "sincerely held" (which means that you don't get to pick and choose which vaccines you take based on political winds). Some states have even stronger constraints, including you to present an affidavit and demonstrate that your religious beliefs are not merely an extension of some misguided personal belief.
[1]: https://www.cdc.gov/phlp/docs/school-vaccinations.pdf