The smog technician is correct about your VW's stereo possibly causing the malfunction indicator lamp to illuminate. It will be known for certain after you replace the MIL light and get the light working.
In 1997 VW and Audi started installing radios (stereos) capable of self diagnostics in most of their vehicle models. In essence these were smart radios capable of sending fault information to the vehicle's ECU (engine control computer) as well as important speaker volume data, radio preset information, and various other media and control function.
In the early days a "k-line" connection was used to connected the radio to the ECU, and more recent computer systems use the CAN (Controller Area Network) system via the CAN-high and CAN-low signal wires.
In either case an improperly installed aftermarket stereo will severe ECU communication and trigger the Malfunction Indicator Lamp on; causing the vehicle to fail the smog test.
We recommend resorting to the original factory stereo, or finding a local professional aftermarket stereo installer who can wire your VW's radio to function properly with the ECU. It can often be done by installing an interface adapter between the aftermarket stereo and ECU. Search or ask about "Smart Radio Wiring Harness" for newer Volkswagen models.