A method for producing silicone hydrogel contact lenses with crosslinked hydrophilic coatings thereon, comprising the steps of: (a) obtaining a silicone hydrogel contact lens having amino groups and/or carboxyl groups on and/or near its surface and a water-soluble and thermally-crosslinkable hydrophilic polymeric material, wherein the silicone hydrogel contact lens comprises amino groups or carboxyl groups or both on and/or near the surface of the contact lens, wherein the hydrophilic polymeric material comprises (i) from 20% to 95% by weight of first polymer chains derived from an epichlorohydrin-functionalized polyamine or polyamidoamine, (ii) from 5% to 80% by weight of hydrophilic moieties or second polymer chains derived from at least one hydrophilicity-enhancing agent having at least one reactive functional group selected from the group consisting of amino group, carboxyl group, thiol group, and combination thereof, and (iii) positively-charged azetidinium groups which are parts of the first polymer chains or pendant or terminal groups covalently attached to the first polymer chains, wherein the hydrophilic moieties or second polymer chains are covalently attached to the first polymer chains through one or more covalent linkages each formed between one azetitdinium group of the epichlorohydrin-functionalized polyamine or polyamidoamine and one amino, carboxyl or thiol group of the hydrophilicity-enhancing agent; and (b) heating the silicone hydrogel contact lens in an aqueous solution in the presence of the hydrophilic polymeric material to and at a temperature from 40°C to 140°C for a period of time sufficient to covalently attach the hydrophilic polymeric material onto the surface of the silicone hydrogel contact lens through second covalent linkages each formed between one azetidinium group of the hydrophilic polymeric material and one of the reactive functional groups on and/or near the surface of the contact lens, thereby forming a crosslinked hydrophilic coating on the silicone hydrogel contact lens, wherein the silicone hydrogel contact lens with the crosslinked hydrophilic coating thereon has an averaged water contact angle of 90 degrees or less. (a) obtaining a silicone hydrogel contact lens having amino groups and/or carboxyl groups on and/or near its surface and a water-soluble and thermally-crosslinkable hydrophilic polymeric material, wherein the silicone hydrogel contact lens comprises amino groups or carboxyl groups or both on and/or near the surface of the contact lens, wherein the hydrophilic polymeric material comprises (i) from 20% to 95% by weight of first polymer chains derived from an epichlorohydrin-functionalized polyamine or polyamidoamine, (ii) from 5% to 80% by weight of hydrophilic moieties or second polymer chains derived from at least one hydrophilicity-enhancing agent having at least one reactive functional group selected from the group consisting of amino group, carboxyl group, thiol group, and combination thereof, and (iii) positively-charged azetidinium groups which are parts of the first polymer chains or pendant or terminal groups covalently attached to the first polymer chains, wherein the hydrophilic moieties or second polymer chains are covalently attached to the first polymer chains through one or more covalent linkages each formed between one azetitdinium group of the epichlorohydrin-functionalized polyamine or polyamidoamine and one amino, carboxyl or thiol group of the hydrophilicity-enhancing agent; and (b) heating the silicone hydrogel contact lens in an aqueous solution in the presence of the hydrophilic polymeric material to and at a temperature from 40°C to 140°C for a period of time sufficient to covalently attach the hydrophilic polymeric material onto the surface of the silicone hydrogel contact lens through second covalent linkages each formed between one azetidinium group of the hydrophilic polymeric material and one of the reactive functional groups on and/or near the surface of the contact lens, thereby forming a crosslinked hydrophilic coating on the silicone hydrogel contact lens, wherein the silicone hydrogel contact lens with the crosslinked hydrophilic coating thereon has an averaged water contact angle of 90 degrees or less.