More than likely the game has scores (values) for how intense the different moves are, and it knows how long you are doing them. If not, it is simply based on how long you are exercising.
That score and time is used as part of the calculation. Your age (birthdate), height, and weight are all factors. For example, the taller you are, the more energy you burn as your limbs will have to move further than someone who is shorter. Also the weight becomes a factor because it requires more energy to move more mass (i.e. the heavier you are the more you burn).
The bottom line is this: it's all based on calculations, and isn't going to be any more accurate than the equations used by the treadmills and elliptical machines at the gym. Using a heart rate monitor will be more accurate, as it factors in your heart rate into the calculation as well--but these are all approximations. They may be accurate enough for regular folk, but if you are very lean or very obese, they may under or over estimate the calories burned (respectively).