(Lansing State Journal, Feb. 16, 1994)
The culprit here is static electricity.
When you move across the seat to get out, you are rubbing the surface of your clothes and the material of the seat together. This transfers charge between the seat and you, leaving you electrically charged. The voltage caused by this charge can be as high as 15,000 volts.
When you get out of your car and close the door, the charge you have collected while driving tries to lower its potential, namely by leaving you (a strong potential) and jumping through the air to the car, which is near the ground (0 volts) potential.
This sudden jumping of charge is the spark we both see and feel. Because the spark has a very low current and short duration, it does nothing more then startle us.