The caster rerolls the damage.
The spell Moonbeam states (PHB p.261):
When a creature enters the spell’s area for the first time on a turn or starts its turn there, it is engulfed in ghostly flames that cause searing pain, and it must make a Constitution saving throw. It takes 2d10 radiant damage on a failed save, or half as much damage on a successful one.
The damage, at the start of a turn in the cylinder or when entering the cylinder's area for the first time, is 2d10 radiant damage, as in roll two 10 sided die. If the spell wanted you to roll once and keep that roll throughout the spells duration, it would likely be written something similar to:
Roll 2d10. When a creature enters the spell’s area for the first time on a turn or starts its turn there, it is engulfed in ghostly flames that cause searing pain, and it must make a Constitution saving throw. It takes radiant damage that you rolled on a failed save, or half as much on a successful one.
This is subject to a DM's discretion, as nearly all things are. Typically when I have a player casting a spell with a similar type of damage dealt, I will have them roll once for the round, instead of every time the spells effects are triggered, simply to save time.