Porous silicon layers were elaborated by anodization of highly resistive p-type silicon in HF/ethylene glycol solution under front side illumination, as a function of etching time, HF concentration and illumination intensity. The porous layer morphology was investigated by scanning electron microscopy (SEM). The illumination during anodization was provided by a tungsten lamp or lasers of different wavelengths. Under anodization, a microporous layer is formed up to a critical thickness above which macropores appear. Under illumination, the instability limiting the growth of the microporous layer occurs at a critical thickness much larger than in the dark. This critical thickness depends on HF concentration, illumination wavelength and intensity. These non-trivial dependencies are rationalized in a model in which photochemical etching in the electrochemically formed porous layer plays the central role.