This negative perception of the school's social climate contributes to high absenteeism. In turn, that contributes to low test scores and poor academic achievement, researchers said.
"School buildings that are in good condition and attractive may signal to students that someone cares and there is a positive social climate, which in turn may encourage better attendance," said Lorraine Maxwell from Cornell University in the US.
She found that leaking toilets, smelly cafeterias, broken furniture, classrooms that were too hot or too cold, mouldy walls and plaster falling off ceilings made students feel negatively about the school's norms and expectations.
The study analysed 2011 data from 236 New York City middle schools with a combined enrollment of 143,788 students.
Also Read
Maxwell also analysed surveys on how parents, teachers and students felt about the school's social climate.
School building condition is also a major contributing factor, Maxwell said.
Buildings also have symbolic value and give us a certain impression about what goes on inside and how much society values those activities, she said.
"So you can understand why kids might think a school that does not look good inside or outside is giving them a message that perhaps what happens in their school does not matter," said Maxwell.
The findings were published in the Journal of Environmental Psychology.