It depends on what tissues are treated by the path of the beam. By itself, it is not painful.
But, it can interact with tissue over time to cause irritation.
The esophagus is the first thing one can cause irritation with that is significant: so swallowing can hurt. This is an organ thereofore we try to avoid. Skin too can be affected, but more with protons than photons. Each case is unique.