More to safety -- we live across the corner from a bar, and there's no streetlight on that corner. Our back yard is open to the street on that side, and people park there all the time. It's partly for us, one of the lights is trained on the stairs cut into the retaining wall, but also partly a courtesy, and it prevents a lot of accidents, some fights, and probably not a few attacks in the dark.
The other reason is that the grill walked away one night, even though it was locked to the brick porch rail. Sneaking up to a house is much harder to do in a brightly lit yard.
For security in the house we have a very friendly dog with a deep, loud voice that barks at everything and everyone. She's a sweetheart, but sounds vicious if you don't know her.