My guess is that if a flash of lightning "has your number on it", it's destined for you. If it does not, then it won't hit you - it then might "have someone else's number on it".
Imagine that every person in the world is assigned a number, and a particular lightning bolt will strike only a person with a particular number. We might then say: "This particular lightning bolt has CopperKettle's number on it".
So, in short, it's either part of your destiny to be stricken by lightning on a particular occasion, or it's not part of your destiny.
If it's part of your destiny, you can't escape it: the lightning bolt already has a tag attached to it that says "Bart-leby", so it's no use making fuss about it. If it's not part of your destiny, then it's no use worrying either, since it won't hit you.
The hero of the narrative is in a fatalistic mood. "If you're born to be hanged, then you'll never be drowned."
From the entry on fatalism in the Oxford Dictionary of Philosophy by Simon Blackburn (Oxford University Press, 2005), page 131:
Either a bullet has my number on it or it does not; if it does, then there is no point taking precations for it will kill me anyhow; if it does not, then there is no point taking precautions for it is not going to kill me; hence either way there is no point taking precations.