Regarding your specific inquiry to how it pertains to MAME, I think the main area where you need to be concerned is with respect to steering and pedals in driving games, and games which use a trackball or a spinner.
Using driving games as an example, some driving games used an analog gas pedal, where the harder you press the pedal, the faster your car would go. The game would support a range of speeds depending upon how much the pedal is depressed. If a game used a digital pedal, the gas is either on or off; the game wouldn't support variations in how much the pedal is depressed.
Similarly for steering, many games support analog steering, where you can turn the wheel a little or a lot depending upon how hard you want to steer. But a game supporting digital steering would only support a turn or no turn.
Most joystick games used a digital joystick where, for example, the game either detects a move in a direction or it doesn't. There are some games that used an analog joystick where the game can detect variations in how far a joystick is moved. If you tried to play an analog game with a digital joystick, your controls would be detected as either off, or full movement (as ArcadEd explained).
So, while playing the game is possible, you wouldn't be able to achieve the level of control that the game may require. If you played Super Mario 64, you'll know that you can change Mario's pace from a walk to a run. Think about how well you'd do if you could only either stand still or run. Or, try playing Centipede on your PC using a digital joystick and see how well you can control your shooter.
What you should be concerned with is if a game which you desire to play will require a specific controller type that you need to install on to your MAME cab. If you want to play racing games, then you'll need an analog steering wheel (which I would expect most to be). Trackball and spinner games are designed for use with analog controls. I think it's safe to say that almost every joystick game before the late 90s used digital joysticks (I have no idea if I'm way off as I never really checked), so I think you can easily get by with digital joysticks except possibly if you're main concern is very recent games.
Hope this helps.
Mario