While I am not a fan of electronic gizmos on a boat, there are two electronic items that I feel are indispensable: Radio and EPIRB.
The EPIRB is a distress beacon that will signal your position so that rescue ships can locate you. EPRIBs will greatly reduce the time to find and rescue you, which increases your chances of survival. EPRIBS are not perfect though, as they send a signal about where they are, not where you are. If you have to abandon ship, be sure to stay with the EPRIB as the rescue crews will come looking for it.
The second crucial piece of equipment to carry is a radio. Radios allow for you to communicate with other vessels in a very quick manner. Yes, Morse Code and flag signals can be used to communicate, but for communication to function, both parties need to be able to understand. If you hail a boat on the radio and they flash a search light at you, will you understand what they just said?
Modern radios also give weather warnings when severe weather is approaching and some have built in AIS receivers. This lets you spot commercial vessels that are far away and make sure you are not on a collision course with them. Another wonderful features of these radios is the ability to see the name of that ship on the horizon. This lets you hail a vessel by name so that you know you are in contact with the correct ship.
These two electronic devices are crucial to carry on board your vessel and maintained in proper working order.