I heard that the footprints of Neil Armstrong are still there, so I was wondering if someone were to die there, would they remain preserved, too?
If not how long would it take for them to decay?
I am assuming in spacesuit here, on the face (lit side) of the moon. Bodily degradation involves much more than external fungi and bacteria.
Cells that receive no oxygen or nutrients die. We talk of such tissue death as dry gangrene when it affects extremities, such as fingers, feet, etc. However, we also recognize gangrenous bowel, etc. which results in tissue necrosis.
Such necrotic cell death is the consequence of acute disruption of cellular metabolism, leading to ATP depletion, ion dysregulation, mitochondrial and cellular swelling, activation of degradative enzymes, plasma membrane failure and cell lysis 
Lysis is messy and wet. Combined with the fluids in our bodies, what one would end up with is a mushy, smelly degraded body, not a preserved body. For a while, anaerobic bowel bacteria would flourish (which smell terrible).
Add to this the extremes of temperature (253° F in the sun and -243° F in the dark.) The suit would have lost it's heating and cooling mechanisms, so the body would alternately spend 14 days in the heat and 14 days in the freezing cold depending exactly where it was (lets say the equator of the moon.) These freeze/bake cycles would further contribute to degradation through ice crystal formation and thawing.
Eventually, because there was no new substrate, degradation would come to a halt, but I'm not sure at what stage this would be. I assume, though, there would be a vast difference between a mummified body (done by dehydration) and a body left to degrade in a spacesuit.
 The mitochondrial permeability transition in cell death: a common mechanism in necrosis, apoptosis and autophagy, John J. Lemasters et. al, Biochimica et Biophysica Acta 1366 (1998) 177-196
Decay is a process where the body is digested by bacteria, fungi and other living things.
The moon has no known biological processes and while its possible for some microorganisms to survive in space, I think its generally understood that the lunar surface would not support life in a significant way, especially if the body is in vacuum.
Other processes would definitely take place. Mummification can result from the body dehydrating and direct exposure to solar radiation will also break down the corpse, but it will mostly leave the body intact.
I think the body would undergo decay. While it is true that the moon does not contain living organisms capable of decaying a dead human body, the human body itself contains huge load of bacteria→ on skin surface and gut which will continue to grow.
The aerobic bacteria will die out as soon as oxygen is removed which is very soon. The anaerobic bacteria will continue to grow and proliferate till substrate (dead human body) will cease to exist. This will be regulated as anongoodnurse has pointed out by the heat and light.
Further, the infectious status of the dead person will also matter. Any fungal infection can alter the rate of decay.