No, it doesn't. The grounding wire is an equipment ground. It connects to metal cases and other points inside the device that require an earth ground, and not all devices actually require an earth ground. Electrically, though, it does nothing for the cord itself or the outlet.
The sparks are caused by the physical design of the plug and outlet, specifically that US outlets are designed in such a way that you can actually see them. Any mechanical connection between two conductors (outlets, switches, etc.) has the potential to spark if the voltage between them is high enough. Other conductors have nothing to do with this potential.
There are, I guess legacy, 2 wire systems. On those systems, one wire is hot and the other is neutral. The neutral is connected to ground at the electrical box.
For 3 wire systems, there is an additional ground wire. It comes into play when the hot wire shorts to a part of the device that is exposed to the environment (hopefully tripping the breaker).
Modern 2 pole plugs are constructed with different size pins, so a device can be wired to be safer when connected to a properly wired 2 pole outlet.