MIDI (Musical Instrument Digital Interface) is a serial (electronic) bus standard established for musicians. A MIDI accordion is equipped with a switch on each key and button. A small circuit board and a switch (it may be a standard contact switch, it may be optical, etc.) for each key and button are all the electronics required inside the accordion, so there is minimal weight added to the accordion. The circuit board scans the keys and sends out MIDI "Note On" or "Note Off" messages every time it detects a change in state of a key (every time a key is pressed or released, respectively). There are, of course other types of messages sent out too (e.g. for selection of patches, pitch bending, volume control, etc.).
The MIDI cable that connects your accordion to MIDI synthesizers is just a relatively thin cable (not a heavy cable like used on the old Cordovox accordions). You can even get wireless transmitters for a MIDI accordion so that you have no cable going out of it at all.
One of the biggest advantages of MIDI for accordions stems from the fact that synthesizer technology is evolving at a much more rapid rate than is acoustic accordion technology. So, if you have a standard (acoustic) accordion that you really like, you don't need to trade it in every time there are improvements in the synthesizers. You keep the same accordion and just upgrade synthesizers. Since companies like Yamaha, Roland and Korg have such huge markets for synthesizers (in comparison with the accordion market), there is a ton of money going into R&D to create really impressive synthesizer technology that the MIDI accordionist can take full advantage of. Further, you only need to buy the synthesizer _module_ (i.e. with no keyboard attached) which saves you money on the synthesizers.
Another nice feature about MIDI accordions is that they make an ideal MIDI controller (in some ways better than a typical keyboard controller). I have both, a keyboard controller and a MIDI accordion, so I can attest to this first hand. Separate MIDI channels can be set up for bass, chords, treble, solo, effectively making the single MIDI accordion sound like a 5 piece band (counting the acoustic accordion as one instrument).
I designed and built my own MIDI interface for use with old Cordovox accordions (just for my own personal use). However, there are fancier interfaces available today (from places such as Deffner Inc. and most other major accordion companies) that also sense bellows pressure to control volume, have contactless switches on keys (such as optical or magnetic), etc.
Disclaimer: I make no guarantees regarding the accuracy of any information included here. If you know of any corrections, please let me know via one of the addresses above.