First, it’s probably not that dark as there are probably street lights available and the kid had a grey hoodie, which would show reasonably well in the dark, under street lights.
Second, Zimmerman knew the gated community and the kid did not. The kid had only been there for a few days and probably didn’t know the layout of the community as well as Zimmerman. Also, and it’s only a guess, the kid was probably trying to find his way home at the time he was trying to get away from Zimmerman. This would allow Zimmerman to catch up to him, as Zimmerman’s focus was catching the kid and not getting away.
Are you aware that after Trayvon ran off into the darkness that Mr. Zimmerman ended his call to 911 and headed back to his truck? Only problem was Mr. Zimmerman didn’t make it back to his truck because Trayvon came back and attacked him.
If someone ambushed you in the dark, was on top of you punching you in the face, you’re screaming for help and no one will come out to help because they are all too scared to do so, what are you going to do? Sit there and just let it happen and possibly die in the process of the beating? Or are you going to defend yourself with the knife or gun you might be carrying?
The place where the confrontation took place was between condo buildings a little ways away from the street where there probably was not that much lighting as on the street.