Are there any environmental factors which can predict atheism or theism?
Your question specifically asks environmental factors which predict theism/atheism. Although your question is quite simple, it actually raises quite a few complexities.
Firstly, are we referring to religiosity, or specifically a belief in god? Many studies examining the psychology of the religion fail to make this distinction clear. Most probably because belief in a god is implied by active participation in religion - though I would say not an exclusive rule. It would be interesting to consider the multitude of pathways in which people get drawn into religion (a cultural institution) compared to a belief in god.
Secondly, your question specifies only the predictors of religious belief that are environmental. From my limited experience, this really closes off several of the most important predictors of religiosity (e.g. personality, attitudes). This makes it difficult to answer the question effectively. Most probably, religious belief can be predicted by a range of both individual level variables (e.g. personality) and environmental (e.g. parents religiosity) - and these variables likely interact with each other (i.e. some personality traits increase likelihood of being influenced by parents religious views).
Finally, the question is complicated as the predictors for belief in god may not be related to predictors of atheism. For instance, if low-socioeconomic status predicts theism, high-socioeconomic status may not be a good predictor of atheism.
I conducted a google scholar review using terms such as: "predictors of religiosity" "predictors of religious". From this, I focused on longitudinal studies and those which focused not simply on personality/cognitive traits. Examples of studies which I found were Predictors of Religiosity Among Youth Aged 17–22: A Longitudinal Study of the National Survey of Children which found
The best predictors of youth religiosity were ethnicity and peers' church attendance during high school. Other predictors were, in order of decreasing magnitude: residence in the south, gender, religious schooling during childhood, maternal religiosity, church attendance during childhood, the importance mothers placed on childhood religious training, and an interaction variable identifying religious mothers who were very supportive.
Individuals had a much higher probability of showing Christian religiosity if they had been strongly socialized by their parents, if they came from a mono-religious household and if they had Christian peer-socialization. Deprivation, social control, religious tradition of the canton as well as gender and age also played a certain role. Individuals with less education and income, living in smaller and rural communities and in traditionally Catholic (or mixed) cantons had a higher likelihood of showing Christian religiosity. The latter finding is very similar to that by Norris and Inglehart (2004) who were also able to show that religious culture was important on a collective (national) level. Furthermore, the study shows that especially older women had a much higher probability than younger women to be religious, while age was much less important for men.
A major criticism of the literature (as it currently stands) is that a large proportion of the quantitative work focuses on western, predominately Christian samples (see Vassilis and colleagues for more information). I would argue the book is open on this one. Clearly, thought has been placed into this field and there are some logical environmental predictors (i.e. parents religious views); however, few of these have been replicated in representative samples.