One of the most common reasons for an electric outlet to spark when plugging something in is the sudden draw of power from the outlet's circuitry. Once the power is flowing freely between the outlet and the appliance, there should be no sparks.
Other possible reasons for sparking when plugging an appliance into an outlet are the age of the outlet and wiring, faulty wiring or an overheating outlet. Under some circumstances, in bathrooms and kitchens for instance, moisture in an outlet can also cause short circuits and sparking. All of these things can be checked and, if needed, repaired by a qualified electrician.