Many people fear three represents the limited number of warnings till they are penalised or suffer another bad outcome, like baseball's three strikes and you're out for instance.
Another belief is that middle person in the photograph will die first. Superstitions about cameras are nothing new from stealing souls to emitting bad luck they've generally been seen as ill omens in many cultures. This particular one seems to originate in Asia, possibly Vietnamese folklore, which is a heady mixture of Buddhism, local tradition, ancestor worship, and paganism. The simple way to avoid this particular superstition if it bothers you is to a. never stand in the middle or b. add a fourth person to the photo.
Third light or three on a match has more prosaic origins, popular among soldiers from the Crimean War up to World War II. It was based on the belief a sniper would see the first light from the match, take aim on the second and fire on the third, killing the third solider to light a cigarette from it. It also been suggested it arises out of the Russian funeral ritual in which the three altar candles are lit by the same taper. To apply the same method to worldly things like cigars or cigarettes is regarded as an act of impiety and hence as unlucky.
To reinforce the latter point three is also significance in most major religions and belief systems encompassing the Christian Holy Trinity, the Hindu Trimurti and Tridevi, the Three Jewels of Buddhism, the Three Pure Ones of Taoism and the Triple Goddess of Wicca, to name but a few.
In maths three is the first odd prime number, first Fermat prime, first Mersenne prime and first Lucky prime, whatever that all means. It's also the number of dimensions humans can sense. While there is evidence to suggest three was the upper limit of our ancestors earliest counting systems with any number above three simply being referred to as many.
You could of course compile a similar list for any other number. Humans are, by their nature pattern seeking creatures, our brains hard wired to impose meaning and order on seemly random chaotic events. It’s not hard to see how this feature of the human brain evolved, imagine two cavemen walking through a jungle full of dangerous predators for instance. One hears rustling and sees something moving in the undergrowth and runs to safely claiming it’s a sabre toothed tiger. The other dismisses it as the wind and a trick of the light. Nine times out of ten cavemen two will be right, but caveman one will on the tenth occasion be the one who survives to pass on his pattern seeking genes to the next generation.