This study aimed to explore the factors influencing school life satisfaction among first-year middle school and first-year high school students. To this end, The 4th and 7th year survey of ‘Gyeonggi Education Panel Study (GEPS)’ were used, and the random forests method, a type of machine learning technique, was applied. The explanatory variables used in the analysis were 312 items in middle school students and 322 items in high school students. By applying random forests, the major factors affecting school life satisfaction were summarized based on the variables included in the top 20, and the analysis results are as follows. First, student autonomy is a common major factor that affects school life satisfaction of first graders in middle and high school. It was found to be teacher-student relationship, teacher morale and enthusiasm, and learning motivation, which showed similar results to many previous studies. Second, learner-centered instruction, teachers’ teaching ability, and peer relationship were derived as unique factors affecting school life satisfaction of first graders in middle school. Third, Korean language efficacy was included as a unique factor that influenced school life satisfaction of first graders in high school. Based on these results, the relationship between school life satisfaction and major explanatory variables of middle and high school students was explained by school level, and discussions were presented according to the results of the study.