Okay, short-word version.

Basically, this used to work in MAME for everyone. But a while ago they took it out. So there's there ways to work around it:
1) Use an older version of mame. The newest version that supported hi score without any fuss was .107. Then you just need the high score .dat file (
http://highscore.mameworld.info ) and you're good to go. Bad news is that you can't use it with any game emulated after .107.
2) Do it the way MAME suggests:
One alternative to saving high scores is to make use of MAME's "autosave" functionality. If you run MAME with the -autosave parameter, then when you exit the game, MAME will save the state of the emulation, and will attempt to restore that state the next time you start up MAME. To the game, it's as if you never pulled the power cord. At this time, however, only a subset of MAME's games fully support save states, so this approach is not a perfect solution.
This will work for most games, but last time I checked, Galaga (for example) really flipped out if you used the autosave feature this way.
3) That link above is for compiling the newest versions of MAME with the hiscore support that was taken out earlier. It's probably the best option, but also the most technical.