In the U.S. the rules vary some between companies. In general, the locomotive bell must sound when there is movement around passenger platforms (arrival/departure,) through grade (road) crossings and around hazardous areas of yards where there may workers. A good example of this is when a train passes a roadside work crew... at minimum speed, and with the bell sounding.
In Trainz, the bell (like the horn and the alerter) serves no functional purpose other than to provide die-hards another feature to distract your attention from actually driving the train. I'm one of those die-hards... and we call it "prototypical operation;" it makes the game more realistic and fun for us.
Enjoy!
~Rick