Children who were securely attached as infants have better social skills and leadership skills, and tend to suffer less from anxiety disorders. However, I believe that securely attached children are not only impacted by attachments made early in life. Even if a child grows up with well-rounded and caring parents, outside relationships can also influence a child's life. For example, if a child is constantly bullied and threatened at school, he will definitely be affected even though he has close relationships with his parents.
I agree, the way a child is treated by his classmates and friends can determine his thoughts on social behavior and can shape the he learns to deal with people when he is older. A child is very receptive to these interactions, which, in the case of a bully, can lead a bullied child to expect the worse from people, possibly leading to a more defined insecurity.