Time-dependent photoconductivy and photoconductivity spectra have been studied in oxygen deficient BaSnO3 thin films grown on different substrates. X-ray spectroscopy measurements show that the films have epitaxially grown on MgO and SrTiO3 substrates. While on MgO the films are nearly unstrained, on SrTiO3 the resulting film is compressive strained in the plane. Electrical conductivity in dark is increased in one order of magnitude for the films on SrTiO3 in comparison to the one on MgO. This leads to an increase of photoconductivity in the latter film in at least one order of magnitude. Photoconductivity spectra show a direct gap with a value of EG = 3.9 eV for the film grown on MgO while on SrTiO3 EG = 3.36 eV. For both type of films, time-dependent photoconductivity curves show a persistent behavior after illumination is removed. These curves have been fitted employing an analitycal procedure based on the frame of photoconductivity as a transmission phenomenon showing the relevant role of donor and acceptor defects as carrier traps and as a source of carriers. This model also suggests that in the BaSnO3 film on SrTiO3 more defects are created probably due to strain. This latter effect can also explain the different transition values obtained for both type of films.