A few years ago, I got curious about how the light gun worked. So, I asked. Straight from the horse's mouth (NINTENDO@noa.nintendo.com):
When you pull the trigger on the Zapper, a white square will flash where all the available targets are on the TV. The Zapper gun can read the flash and determine if something was hit or not. If the Zapper gun detects a flash, it can tell by the timing which target was hit.

Amazing what one can learn by asking the right people.