Typically, electric solder contains rosin core flux; plumbing solder uses an acid-based flux. Therefore, it's not a good idea to use plumbing solder for electrical connections because the acid in the flux can damage the wiring and cause a connection failure. Electric welding has a lower melting point (around 360˚F), while welding used in plumbing has higher melting points, generally above 400˚F. This is why electric welding can be performed with a soldering iron, while many welding pipes use a welding torch gas for heating metals.
Electric welds also tend to be smaller gauge, suggesting that they melt faster, rather than pipe welding, which is generally thicker gauge and requires more heat to melt. Plumbing welding comes in a larger diameter coil of wire than electric welding, making it more difficult to handle than electric welding. This alone is a good reason not to use plumbing solder for electrical work, but it can also damage electrical conductors. Resin-core electrical welding, on the other hand, is not strong enough to withstand pressurized water.
All types are still sold, so make sure the product says lead free if the solder is intended for household plumbing. However, that corrosive acid flux will quickly degrade wiring if plumbing solder is mistakenly used for electronics. The acid in the plumber's flux helps the solid-core solder form a tight bond, but it is corrosive, especially when subjected to the heating effects of electrical resistance. The solder you use for plumbing work usually has a solid core, and for it to adhere, you must apply acid-based flux.
Soldering is an important component of both plumbing and electronics, but plumbing soldering and electric soldering are two very different substances. Using the wrong solder can lead to leaks in plumbing fixtures and failure of electrical connections. Due to the dangers of toxic lead in drinking water, local building codes now legally require the use of lead-free plumbing solder on all drinking water pipe connections that require soldering. Plumbing welding with high tensile strength makes pipe joints stronger, but melts at higher temperatures than softer electronic solder.