What could this pea-sized bump under the skin be on the back of my baby's head?

Lymph node. It's a lymph node. Specifically an occipital lymph node, totally normal! the occipital nodes drain the scalp area, so any time you have a scalp injury or irritation they grow in response to it. With babies it doesnt take much to make them big, just laying down a lot lets particles get on their scalp which caused the nodes to grow. Teething can also cause this.
Normal lymph node. We have lymph nodes scattered throughout our body & they are often detected in the neck where they sit on top of neck muscles. These nodes are little fluid strainers that take body lymph & remove stray germs from things like bug bites. They are often pea sized at rest & grow to dime sized when working. Within 2-3 wks they often shrink back down unless they are stimulated further.Ask her doc if so.
Hair cyst?But ask MD. In all likelihood it is most likely a simple hair (follicular or pilar) cyst. However it could be something more serious and the exact location may be critical. For example small masses over the "soft spots" of the skull ("the fontanelles") may be a sign or dermoids, gliomas, or encephalocoeles, etc. Discuss with your prediatrician.