I believe it is similar to the real world, where (at least in Europe) people who are not very religious still celebrate Christmas to some degree.
As other people mentioned, in the ancient times people celebrated the winter solstice and later Christmas was established by Christianity. In the XX century people in western Europe became less and less religious, some calling themselves atheists or agnostics, some just didn't visit church too often. But still these people followed some Christmas traditions like decorating a Christmas tree, singing carols, giving themselves gifts or having a festive meal. We still can find some Christmas decorations in public places like shopping malls and radio stations keep playing themed songs. We can tell that Christmas has become a secular holiday for the whole societies: for some
people it has a religious dimensions, some people are just having some rest and fun.
The religion is never mentioned across Harry Potter books, but it doesn't imply that magic society is 100% atheist. It is possible that some of the wizards are religious, but it is not explicitly shown in the canon. Most of them may just follow the tradition and enjoy the occasion to spend some time with family. Probably there are some wizards who don't celebrate Christmas at all (I can't imagine Voldemort singing carols or preparing a pudding).
As for Hogwarts, it seems that Christmas is a good opportunity to have a longer break, allowing students and teachers to visit their families they don't see for most of the year and to have some rest in the middle of a school year. It is also an occasion to have some social integration for the lonely employees and students staying at Hogwarts, satisfying their emotional need for belongingness, providing some substitute of the family.