Salmonella poisoning can cause headaches if it’s serious enough. It’s one of the milder symptoms that means you have food poisoning, but that you shouldn’t be too worried about what’s going on yet. You should keep an eye on the symptoms, no matter what is going on. If you think you have food poisoning, especially if you don’t get headaches all the time, you should think about what you’ve eaten lately. If you can think of any culprits that might have given you food poisoning, ask around to see if someone else ate it too and if they’re feeling unwell.
However, if you have more serious symptoms - fever that doesn’t break, diarrhea that lasts more than two days, etc. - or if you’re simply worried about your health, go see a doctor.