Infections, such as throat infections or dental abscesses, can lead to swollen lymph nodes in the neck as the immune system responds to the infection.