I to have the same issue. Only with connecting devices with power that are also plugged in to an outlet. Any devices running on batter though does not do it....
Static electricity is the most common cause of a *small* spark from a USB connector when plugging it in. It is generally harmless, except in some cases if the computer is poorly designed it can trigger a reset. I have never seen it happen on a Mac but have observed this many times on various home-built PCs.
You can usually confirm if it's static electricity or not by first touching the metal USB connector to a grounded case. If it only sparks a little one time, then not the 2nd or 3rd time, it was just a one-time discharge of static. This is more common in winter months when air is dry, since humid air helps bleed of static charges.
If touching the USB connector to a metal case repeatedly makes a spark each time, that is abnormal and indicates an electrical problem.
While they are generally very safe, USB connectors do carry power. If a USB connector is *forcibly* jammed into a socket at an angle, in some *rare* cases this can bend a pin and cause a short circuit. This isn't generally harmful to a person -- it is DC power and usually limited to a fairly low current and voltage. However the connector or device may heat up. It is more common on a mini-USB connectors like these:
https://en.wikipedia.org/wiki/USB#mediaviewer/File:Mini_usb_AB.jpg
Like USB, a mini-display port or Thunderbolt port also carries DC power. If you jam an incompatible mini-USB connector into it, the metal sleeve on the USB connector may short the display port and cause the computer to malfunction or shut down. Normally this is pretty hard to do since the connectors are incompatible but if it gets pushed with right angle and force, it could happen.