One of the basic questions of the pony universe. We've learned quite a bit about cutie marks in various episodes throughout the series, with the latest being the S3 finale itself. I'm inclined to believe that cutie marks may be a magical force connected to souls or something along those lines, and thus, they happen automatically. That would explain why unicorn's magic, etc. can't change them, force them to appear, etc. They're a strong magic built into nature itself that triggers your cutie mark when you have matured to a point where you discover your talent, what you enjoy to the core of your being.
Ergo, I don't think anyone 'assigns them'. I'm sticking with 'Ancient magical force built into Equestria itself' As for when they appear, that depends. For most ponies it's when they're fillies, at a point where they discover their core passion. It's all apart of self-identity. I'm not sure if they can change or not (that happens to be its' own topic entirely), but I do think they're just a part of nature, magic and ponies themselves :3
That's as far as I'm willing to analyze this specific topic, anyway
BTdubs, @, I've merged your topic 'How Cutie Marks Work' with 'Cutie Mark Assignment', as they both discuss the specific process of cutie marks and how they work.