A method for producing a solid electrolyte, which includes the steps of applying a solution containing a five-membered heterocyclic compound as a polymerizable monomer on a substrate surface, and polymerizing the applied monomer to give a solid electrolyte. The monomer-containing solution contains the polymerizable monomer and at least one polymerizable compound selected from a dimer of the monomer and a trimer of the monomer, at a proportion satisfying the equation:A / (B+C)=100-1,000,000whereA: concentration of the polymerizable monomer,B: concentration of the dimmer in terms of the concentration of its monomer, andC: concentration of the trimer in terms of the concentration of its monomer. In another aspect, a method is disclosed wherein a solution of a compound having a thiophene skeletal structure, which solution has a light absorbance of 1.5-10 at 300-340 nm, is applied on a substrate surface and polymerized.