Polymer-clay nanocomposites thin film coatings have improved water vapor and oxygen permeability, in addition to improved corrosion resistance, while retaining high transparency, high electrical resistivity, and excellent fire-retardant properties for use as encapsulants for photovoltaic module assemblies and barrier coatings in other photovoltaic applications.