"Snapped" can mean angrily. Snapped can also be the past tense of the verb "snap" which is the verb used to explain what people do when the take pictures. They snap pictures. Tom "snapped" at someone who is taking pictures. This joke is playing on the different meanings of the word snapped.
What are you taking pictures of ? Tom snapped .