First, make sure you have a proper P-trap installed under the sink. This trap holds water and provides a seal against sewer gases getting up into the bathroom. Without a P-trap, gases will leak in constantly, and will be displaced by water down the drain which can force the gases up into the bathroom even if normally it’s not detectable.
Also make sure there is a proper vent for the sink. Even with a P-trap, if there’s nowhere for back-flowing gases to go, they’ll bubble up past the trap. (And even if you don’t have a vent, that might be OK.)
To diagnose this, plug the sink and begin filling it; you shouldn’t get any musty smell at first because there’s no air movement. Once the water level hits the overflow drain, you will start smelling the musty smell for a while because the water is displacing the gas, which wants to rise above the water and so will move up into the bathroom. If this is the problem, you can ameliorate it with some foaming pipe snake; pour it down the overflow drain and it will clean out any caked-on gunk which contributes to the smell, and which may be trapping the water. The real fix is to make sure there’s no “damming” effect of construction defects at the bottom of the overflow drain (a lip of porcelain, issues where the overflow meets the metal drain downpipe, etc).
Does it smell when you turn on the tap and catch the water in a bowl (so it doesn’t go down the drain)?
If this doesn’t work, it’s something in the basin, drain, trap, or overflow drain. KeithS has some good answers above, but I also recommend the following:
– Spray bleach down the drain and overflow drain to kill anything nasty in there. You can bleach the basin too for cleanliness.