I believe there is a corelation between the type of attachment bonded between parents and their child, and the type of environment and surroundings they have. The family dynamic and the way the child's parents handle situations "mold" the child, yet the external factors as well, also influence and help "mold" that child. Their environment and experiences either positive and negative will allow the child to grow and learn from those experiences, with the help from their parents as in how to handle those situations.
I agree that their is a correlation between with the attachment and the environment in which the child develops. A child in a well-educated middle class family is much more likely to develop a secure attachment than one that develops in a lower class family. In turn, the increased probability of having that secure attachment increases the child's chances at better well being as his parent will also promote higher education and stable relationships. This is less prevalent with children in lower class families.