Forget about using your defense weapon and intervening in the fray. Although there was danger, there was no "clear and present danger to life and limb" of you or anyone in your family. If you intervened, there is a good chance you would get yourself locked up. Hearing pops will not convince a jury that it was necessary for you to go out and start shooting at the "bad guys" yourself. Maybe the "bad guy" was actually undercover police. I have lived to the ripe old age of 56 and have lived in "bad neighborhoods" for significant portions of my life. Having said this and getting it off my chest, what you should now do is the following:
1. Evaluate the perimeter security of your home. Use a published guideline such as "Rate Your Risk"
http://www.rateyourrisk.org/ If you find deficiencies, make a list, put them on a schedule and then make sure you do them!!
2. Get a big dog. The dog is infinitely more of a deterrent that an automatic yard light or an alarm.
3. Go beyond the evaluation in item 1. above. Is your house masonry, brick, wood frame with siding or one of the newer systems such as styrofoam on light gauge framing with a spray on stucco finish? Some of the newer wall systems will not stop a bb gun, let alone a bullet. Look at where your family members sleep. Does your daughter sleep in a bunk bed in full exposure to potential gunfire down the street? Maybe you need to move her.
4. Write and practice an emergency drill, similar to a family fire drill. Make sure everyone knows what to do (get down low, and behind something substantial) when they hear shots.
5. Keep the firearm handy but safe from unauthorized use, especially little hands.
6. Keep a cell phone handy in your bedroom. Make sure all the children know how to call the police.
7. Get proper firearm training for yourself and your wife.