I've read that the photoelectric effect cannot be explained according to Maxwell's equations and theory of electromagnetism. Classical EM theory treats light as a wave and states that the intensity of the light matters and not the frequency. According to Einstein, if we think of light as a particle instead of a wave that we can predict and explain the photoelectric effect. Why is this so? Why can't we use classical EM to explain the photoelectric effect? How does changing from a wave view to a particle view of light help explain the photoelectric effect? Do other theories like QED also accurately explain the effect?