What causes lymph nodes on a child's neck to swell up occasionally?

Common finding. Lymph nodes are located throughout the body ; generally noticeable in exposed areas like the neck. They are usually pea sized at rest and enlarged when stimulated by bug bites, dermatitis, drainage or infection. They usually return to resting size in 3-4 wks.They rarely can become damaged by infection ; grow to golf ball size ; need drainage or removal.
Normal. Lymph nodes swell up when they are doing their job correctly. They help to fight inflammation and will enlarge when doing so. They are aiding your baby's immunity.
Infections, allergies, dermatitis are the more common causes. The nodes will usually resolve in a couple of weeks.