Psychological harm from scaring baby on purpose?
I think this fully depends on the level of scared. While your baby's personality is still forming, it's pretty important from a psychological standpoint to not terrify them. A little spook here and there I think allows them to understand their fight or flight reactions and learn how to contain them, what they are for, when they are needed.
Keep in mind though, baby's brain is still forming and scaring them too frequently will 'wire' their brains for an unsafe environment (think along the lines of epigenetics here) While that can be useful in certain scenarios, that will also raise their cortisol levels and change their thought patterns, putting them at a higher risk of obesity, heart disease, and mental illness later in life.
Most important, I think it is truly harmful to scare a young child in which the personality is still forming and meshing in
1. The obvious abuse sort of scenarios. Just don't. I'm sure everyone here knows this.
2. With food. I 100% disagree with withholding food from a child. This is a memory that humans can easily hold onto for life because it is rooted directly in our instinctive mind, directly linked with survival. (Anybody have cafeteria bullying memories clear as day?) I don't mean starving your child (we all know that's not right), or saying no to a lollipop. I'm talking about the 'You behave how I wish or you'll go to bed without dinner.' scenario. There are plenty of studies on this and a quick Google search can tell you all you need to know. Needless to say, to the child you are threatening its survival, and this can cause severe and ongoing psychological stress and trust issues.
3. Anything that can make your baby fear for its life. You may not be ACTUALLY putting it in danger, but baby may not always understand this. Any sort of tricks or pranks or spooks that make a child under school-age fear for its very survival can cause very difficult long term problems from mild PTSD, full-blown dissociative disorders, among many other things.
I will also throw into this as an aside... Before deciding to engage in corporal punishment (spanking, whipping, swatting, etc) PLEASE read the studies on such. I know many of us had this occur when we were children, but there is a lot of evidence about its effects on the child and behavior into adulthood. Not trying to start a fight here, I know it's a touchy topic but it's the difference between Pavlovian conditioning and critical thinking. I won't say anymore, other than ask any of you contemplating this method, PLEASE read recent psychological studies.
Always think first before you spook your baby, but understand that for most people fear is a part of life and must learn to be dealt with. As with all issues, please find safe, well-thought out, and loving, creative alternatives to make sure baby grows up to be a healthy, happy, regulated adult.