Pure BiFeO3 (BFO), Nd doped BiFeO3 (Bi0.9Nd0.1FeO3, hereafter BNFO) and Nd–Co codoped BiFeO3 (Bi0.9Nd0.1Fe0.9Co0.1O3, hereafter BNFCO) films on Si(100) were prepared by a sol–gel method. X-ray diffraction shows that all the films were single perovskite structure and a phase transition appeared in BNFO and BNFCO films. Dense microstructure with evenly distributed grains about 100 nm was observed by SEM. The ellipsometric measurements were carried out in the UV–visible region and the corresponding experimental data were fitted by using a model consisting of air/roughness/film/Si(100). At a wavelength of 600 nm, the refractive indexes of 2.69, 2.84 and 2.78 were estimated for the BFO, BNFO and BNFCO films, respectively. The extinction coefficients of these films were almost zero at wavelengths larger than 550 nm. The band gaps of the BFO, BNFO and BNFCO films were estimated to be 2.95, 2.89 and 2.93 eV, respectively.