Although head banging (against a wall, the sides of the crib, or any other surface) may look disturbing, it's probably nothing to worry about. In most cases, head banging is just a normal part of a baby or toddler's behavior (perhaps to relieve stress when he's angry or frustrated), exploration, and experimentation. Some experts believe that head banging is just another way toddlers self-soothe (like thumb-sucking) since the rocking and rhythmic sensations can be calming. However, it's a good idea to keep an eye on how often your child bangs his head and how intensely he does it, and report this to your doctor. Most pediatricians advise parents not to interfere when your child's banging his head. Kids don't intentionally hurt themselves and should stop if it becomes painful. Most children under 3 can't generate enough force to seriously injure themselves anyway.
While head-banging can be a symptom of developmental issues, it's usually only a problem if it continues beyond age 4 and occurs along with other troubling behaviors, such as repetitive motions (like hand-flapping and rocking), developmental delays, and a lack of social interaction with parents and peers. If your child is otherwise healthy and happy, there's probably no reason to be concerned.