Why did classical physics failed to explain the fact that in photoelectric effect, there is a threshold frequency value below which the effect does not occur? I not sure if my answer actually states why it failed but this is what i think: this is because different materials have different threshold frequencies and most elements have threshold frequencies in the ultraviolet region of electromagnetic spectrum.
In classical mechanics, we consider intensity to be a measure of energy (it certainly is but it doesn't work well with the photoelectric effect). A physicist who loves classical mechanics would expect electrons to be ejected at any intensity (if not immediately, after sufficient time).
In reality, it was observed that shining light below a certain threshold frequency did not eject any electron. Even if you shined a light of large intensity, not even a single electron would be ejected. This took the physicists in the early 1900s by surprise because the light of high intensity has the all the energy it needs to eject electrons but it fails to eject even a single electron.
Einstein postulated that light comes in packets of energy, i.e: they consist of photons each carrying a discrete amount of energy. If you go deeper and look how photoelectric effect works, you'll find that each individual photon is responsible for ejecting an electron. Shining a light which has an awful lot of energy (high intensity; lot of photons) but with each photon having very little energy, it won't eject any electron.