Only metals undergo photoelectric effect???
No. Most metals, especially the alkali metals, emit electrons from visible light. Non-metals emit electrons from higher energy photons, in the upper range of ultraviolet.
Also, you might want to ask yourself, what makes the metals more 'metallic' than other elements? Compare those characteristics to non-metals, and you'll understand why the photoelectric effect can occur in non-metals at higher photon energies.
Metals give up their electrons more easily: smaller band gap. Non-metals like to hold on to them: larger band gap.
I didn't get your point... Actually, I didn't get clarity...
Separate names with a comma.