The influence of surface properties of sol-gel derived silica on pH sensing is presented. It is observed that the surface charge of silica, caused by pH change, leads to absorption of cations on the porous silica surface. As a consequence, one can observed an increase of refractinve index of the sol-gel material, hence, its optical properties and light propagation conditions. Since the effect is pH-dependent and its magnitude is so strong, it can even be exploited for pH sensing. Theoretical considerations correlate with results of surface charge and optical properties of a model of pH sensor measurements.