Research on children and the law has recently renewed its focus on the development of childrens' ties to law and legal actors. We identify the developmental process through which these relations develop as legal socialization, a process that unfolds during childhood and adolescence as part of a vector of developmental capital that promotes compliance with the law and cooperation with legal actors. In this paper, we show that ties to the law and perceptions of law and legal actors among children and adolescents change over time and age. We show that neighborhood contexts and experiences with legal actors shape the outcomes of legal socialization. Children report lower rating of legitimacy of the law and greater legal cynicism when they view interactions with legal actors as unfair and harsh. We show that perceived legitimacy of law and legal authorities shapes compliance with the law, and that these effects covary with social contexts including neighborhood. We identify neighborhood differences in this relationship that reflect differential experiences of children across neighborhoods with criminal justice authorities and other social control agents. The results suggest that legal actors may play a role in socialization processes that lead to compliance or rejection of legal and social norms.