Because of the enormous variation in mental health and environmental stimulus, there is no single answer that explains homicide from outside influences. However, several variables can work together to make a more hostile environment, one that can increase the likelihood of influencing a homicide.
First, the environment should be stressful. A relaxing environment is not likely to promote violence. An increase in stress will help to erode mental deliberation and rational judgement.
Second, the environment should contain like-minded people. Violent tendencies can be enhanced by the support of others, and without an opposing voice in authority, those violent thoughts can be increased and empowered until they feel correct instead of illegal.
Third, there should be a disconnect between those having violent thoughts and the common society around them. It is easier to commit a homicide when there is no communion with others; the consideration of people as things instead of individuals promotes the idea that life is meaningless and so there is no reason to act within accepted moral boundaries.
Many environmental influences can affect mental stability, and some even act as justification: "I was wronged, and so I am justified in wronging others." In the end, each case is substantially different, and environmental factors become common only in very large samples.