How does wavelength affect the photoelectric effect?
You may like to go through Einstein's explanation/theory of photoelectric effect.
Borrowing some material for this answer:
A single photon, whose wavelength is lower than the threshold wavelength for a specific metal, has the required energy to eject one electron thus creating the observed photoelectric effect.
Einstein used Planck's famous expression
Einstein put forward the following equation:
For photoelectric effect to occur, the energy of the photon must be greater than the work function.
As the wavelength of the incident light decreases but is lower than the cut-off wavelength, the maximum kinetic energy of the photo electrons increases.