The surface phase transition in a SrTiO3 crystal was studied by second optical harmonic generation. Nonlinear optical response singularities were observed at temperature T*=145 K, which was 40 K higher than the Tc structural phase transition temperature in the crystal volume. Nonlinear critical opalescence in the crystal volume caused by the presence of point defects was studied. The second harmonic field and the intensity of critical opalescence were calculated based on the phenomenological model of nonlinear optical processes with the use of the Landau theory of phase transitions.