Titanium dioxide thin films were grown by sol–gel technique in order to obtain films to be used in photocatalytic reactions. We present results on the structural and optical characterization measured for series of films in which number of layers and sintering temperature were changed. Using X-ray diffraction we have characterized the crystalline phase in the films depending on the growth conditions and by using the spectrophotometer we characterized the resulting bandgap energy. The results on the photocatalytic activity were obtained by immersing these films in a methylene blue solution with the presence of ultraviolet light, which is a standard used to characterize the efficiency of the reaction. High bactericidal activity with these films in wastewater samples was observed subtracting the action of used ultraviolet light, through gas evolution measurements using photoacoustic (PA) technique.