Titanium oxynitride (TiOxNy) films capped with 10 nm titanium oxide (TiO2) layer were prepared using reactive direct current magnetron sputtering from pure Ti target. Part of the samples was annealed. Energy dispersive analysis of X-ray revealed that all the samples contain nitrogen and the incorporation of nitrogen into the oxynitrides is not linear. Phase investigation by X-ray diffraction showed structural variation with changing oxygen and nitrogen gas flow rates as well as annealing. Anatase, brookite, rutile and titanium nitride were detected individually or mixed in the as-prepared and annealed samples. The optical properties were found to be controlled by a structure and chemical composition. Transmittance and reflectance measurements were carried out by a high performance double beam ultraviolet-visible-near infrared spectrophotometer. Based on that, the energy band gap, refractive index and extinction coefficient were derived. The obvious difference between the dark and light currents indicated the validity of the TiO2/TiOxNy bilayer samples to act as photoanodes. All the annealed samples have photoelectrochemical water splitting response better than the as-prepared samples. The as-prepared TiO2/TiOxNy bilayer films were hydrophobic (contact angels, 81° - 93°) and their contact angles were independent from the nitrogen content. The annealed samples have lower contact angles than the as-prepared samples. The wettability of the as-prepared and annealed samples was changed from hydrophobic to more hydrophilic with increasing illumination time. These results are of important interest for the self-cleaning surfaces.