They don't need it the way many lizards do, who will get sick without it. But there is good evidence that it's beneficial. If nothing else, they can see it. And while they are mostly active at night or at dawn/dusk, they can be seen basking during the day in the wild either openly or cryptically. I have UVB in my BP's cage, and he has lots of hides including some that are completely in the shade and dark, but he still hangs out near the UVB lamps during the day most days. He doesn't usually sprawl out in the open completely, but he finds ways where he can be partially hidden but still get UV exposure. That said, it took a longish time after I installed the lighting before he settled into this pattern.
I did not notice changes in my snake's color or skin or feeding response when I moved him into a larger viv with lights, but he does clearly like spending time under them and that's a good reason to me.
It's not required, but it probably helps some and it certainly doesn't hurt. If you have live plants in the cage, the light will benefit them (not the UV per se, but the rest of the lamp's output). The important thing is that the snake has to be able to choose whether to be exposed to it or not.