A. Because when the photoelectric effect occurs, the zinc plate loses electrons and becomes positively charged. If an electroscope is used to contact the zinc plate, the electroscope will also be positively charged, so A is wrong.
B. Some electrons on the surface break away from the atomic nuclei and fly out of the surface of the metal plate to form photoelectrons. Therefore B is correct.
C. Use yellow light to illuminate the zinc plate instead. The frequency of the incident light is smaller than the frequency of blue light, so the photoelectric effect may not necessarily occur and the electroscope pointer may not deflect. Therefore C is wrong.
D. Use ultraviolet and infrared lamps to illuminate the zinc plate. Since the frequency is greater than the frequency of blue light, the photoelectric effect will definitely occur, and the electroscope pointer will deflect. Therefore D is wrong.
So choose: B.