Purpose: Understanding health-related quality of life (HRQOL) in children and adolescents, during a pandemic and afterwards, aids in understanding how circumstances in their lives impact their well-being. We aimed to identify determinants of HRQOL from a set of biological, psychological and social factors. Methods: Data was taken from a longitudinal sample (n = 1843) of children and adolescents enrolled in the prospective school-based cohort study Ciao Corona in Switzerland. The primary outcome was HRQOL, assessed using the KINDL total score and its subscales (each from 0, worst, to 100, best). Potential determinants, including biological (physical activity, screen time, sleep, chronic conditions, etc), psychological (sadness, anxiousness, stress) and social (nationality, parents education, etc) factors, were assessed in 2020 and 2021, and HRQOL in 2022. Determinants were identified in a data-driven manner using recursive partitioning to define homogeneous subgroups, stratified by school level. Results: Median KINDL total score in the empirically identified subgroups ranged from 68 to 83 in primary school children and from 69 to 82 in adolescents in secondary school. The psychological factors sadness, anxiousness and stress in 2021 were identified as the most important determinants of HRQOL in both primary and secondary school children. Other factors, such as physical activity, screen time, chronic conditions or nationality, were determinants only in individual subscales. Conclusion: Recent mental health, more than biological, physical or social factors, played a key role in determining HRQOL in children and adolescents during pandemic times. Public health strategies to improve mental health may therefore be effective in improving HRQOL in this age group.