The Photoelectric cells are based on the theory of photoelectric effect, where we consider that by providing sufficient energy we can excite the surface electrons so that they get replaced. So, for the element to be used in the photoelectric cell, that must have the capacity to lose electron in the even very low amount of energy supplied. Since Cs and K is the electropositive element of all so it has the minimum ionization energy and so contains the maximum capacity to lose electrons. This is why Cesium and potassium are used in photoelectric cells.