I'd venture a guess that the manufacturer skimped on the motor. Most good hair dryers use brushless AC motors, which are quieter and don't spark. This looks a lot like a brushed DC motor similar to what you'd find on power tools. Where the carbon rods (called brushes) contact the rotor, some arcing occurs, leading to the sparks. Normally these are blue, but I think your motor behind some slightly yellow plastic, resulting in the green hue. The sparks generated by these types of motors are harmless (as long as you don't put something super flammable through the hair dryer).
IMO, you're probably just fine to keep using the dryer as long as those sparks are staying internal and there aren't any signs of burning. Keep in mind that brushed motors do have kind of a weird electrical smell to them when they are running. Of course if this makes you uncomfortable, you should just get a new one. I'm just a random dude on the internet, please use your own best judgement.