To evaluate how social behaviors relate to SARS-CoV-2 test positivity across pediatric age groups. Multicenter, cross-sectional study recruiting children <18 years old tested for SARS-CoV-2 infection in emergency departments between 2020 and 2022. We used multivariate logistic regression to assess how self-reported social behaviors affect SARS-CoV-2 test positivity across four age groups. Causal mediation analysis quantified how mask-wearing and presence of an infected close contact mediated the SARS-CoV-2 risk of given behaviors. 7272 children were enrolled and 1457 (20.0%) tested positive for SARS-CoV-2. Attending a social gathering was associated with increased odds (aOR 1.64, 95%CI: 1.05, 2.57) of SARS-CoV-2 positivity among children aged 5-<12 years. Those attending in-person school/daycare were less likely to test positive for SARS-CoV-2 across all age categories. Attending childcare was associated with 16.3% (95%CI: -21.0%, -11.2%) and 9.0% (95%CI: -11.6%, -6.5%) reductions in the probability of testing positive for SARS-CoV-2 infection, with 53.5% (95%CI: 39.2%, 73.9%) and 22.8% (95%CI: 9.7%, 36.2%) of the effects being mediated by the presence of a close contact among <1 year and 1-<5 year age groups, respectively. Masking in public mediated the association between childcare attendance and SARS-CoV-2 positivity in children aged <1 year. Attending social gatherings increased the risk of SARS-CoV-2 test positivity in 5-<12-year-old children, but in-person daycare/school was associated with a reduced odds of testing positive across all ages. Settings with high public health adherence (i.e., schools) reduced the risk of testing positive for SARS-CoV-2, possibly from reduced close contact with SARS-CoV-2 positive individuals.