This is not a simple subject, and would be better left to the OTB board. But it's not building exteriors that tell the tale. It's mostly about the qualifications of the teacher, curriculum standards and socio-economic status of the students. Alabama is an extremely poor state, so that is a big factor in academic performance.
That said, NY has some of the toughest requirements with masters degrees being mandatory and districts required to adapt the core standards. Testing has been a real problem, mostly because greedy corporations (like Pearson) tried to keep the process "secret". But NY has a much better handle on that now and the process has been opened up. Another reason for NY's public school costs have to do with IDEA. In this state we actually follow federal law .. although corning-cutting is always an issue. In Alabama, their record with special needs kids is atrocious. There are many, many aspects to educational quality. Money isn't the only factor (teacher credentials, teacher to student ratios, early intervention, socio-economic status are significant issues), but you can't hire qualified teachers with masters degrees and pay them like laborers.