Photon energy and the photoelectric effect
Photon energy is Planck's constant times frequency, so frequency decides whether an electron escapes and intensity decides how many do.
A worked example
A photon of frequency 8.0 x 10^14 Hz carries E = 6.63 x 10^-34 x 8.0 x 10^14 = 5.3 x 10^-19 J.
The mistake people actually make
Below the threshold frequency no electron is emitted, however bright the light. Use hf = W + Ek(max), so the work function is subtracted from the photon energy, not added to it.