In the photoelectric effect, when a particular wavelength's light is focused on metal, it ejects an electron from its surface.
Work function is defined as the minimum amount of energy required to induce the emission of electrons from a metal surface.
The negative sign is used to represent the difference between photon energy and work function.
The work function isn't negative, The negative work function tells you how much work needs to be added to the bound electron, by the photon it absorbs.
The negative sign only comes due to the difference between energies that are negative as well as positive.