In many countries (certainly the EU and UK), religion is certainly considered personal information, and this sort of question skirts fairly close to that if asked during eg. Lent or Ramadan.
And even outside those periods, it's completely unrelated to the job or the applicant's suitability for it. It might be fine as small talk when setting a candidate at ease or as an icebreaker, but it's unreasonable to expect to form a judgement based on their answer.
Besides, it's the sort of thing that an LLM-based system should easily be able to handle. I'm not sure it would ever give you any sort of useful signal.