The Short Version
This claim is well-supported. Lightning's plasma channel reaches approximately 30,000°C (54,000°F), while the Sun's surface (photosphere) is about 5,500°C (10,000°F) — making lightning roughly five times hotter. This is confirmed by Weather.gov, NASA, Britannica, and other authoritative sources. The claim correctly specifies "the surface of the Sun," which is the key qualifier. The only caveat: lightning's temperature is a brief, localized peak, not a sustained condition, and the Sun's core (~15 million°C) is vastly hotter than lightning.