Thin film sol-gel coatings on glass substrates for use in solar cells were studied. The precursor solution was made of tetraethoxyorthosilicate (TEOS 2.0-6.0% v/v) using hexadecyltrimethoxysilane (HDTMS 0.1-1.5% v/v) as hydrophobic modifier in the presence of NH4OH (0.05-1.0% v/v) as catalyst. Dip-coating was applied to glass and studied for the effects of sol preparation on water-contact angle, transmittance, and resistance to outdoor exposure of the coating. The results showed TEOS, HDTMS and NH4OH contents at 6.0, 1.0 and 1.0 vol.%, respectively, as optimal. Superhydrophobicity with a water-contact angle of 150.69o can be achieved with high transmittance and self-cleaning properties. The morphology and surface roughness were characterized by AFM and showed aggregates of silica particles in combination with the inherent microscale roughness of glass. The stable voltage of solar cells having a coatings of this type (dip-coating in sol-gel with NH4OH catalyst) meets the industrial requirements with potential for outdoor applications.