Whether the generator belt needs to be replaced is conservatively done by looking at the manual that comes with the car, which will have a clear mileage for replacement.
Of course, it can be replaced as needed. You can have a mechanic check it every time you go in for maintenance, and you can also visually inspect the belt for cracks. The belt in the photo below is due for replacement.