Polymer electrolytes were prepared by doping polyvinylpyrrolidone and ammonium iodide ion with an ionic liquid (IL) 1-hexyl-3-methylimidazolium iodide. Polymer electrolytes were prepared by solution cast technique. Ionic conductivity was improved by the addition of IL which is studied using complex impedance spectroscopy by evaluating ionic conductivity. Using maximum electrical conductivity film, laboratory-scale dye-sensitized solar cell has been fabricated which shows stable performance.