Higher median incomes and lowering the level of poverty reduce crime.
A sense of community can also help.
There is debate as to whether a strong police presence helps.
There are also normally higher levels of security in more well-off areas.