I actually just did that: https://news.ycombinator.com/item?id=39868106
Answer - Texas and Illinois are higher per capita, but Texas has no income tax. Might be hard to directly compare.
You can compare dollars per student, however.
According to https://worldpopulationreview.com/state-rankings/per-pupil-s...
CA: $13,642 TX: $9,871 NY: $24,881
By this, CA and NY should have the best schools, and Texas's should be absolute ass.