The term surface temperature is used in astronomy for stars an planets.
In the case of stars, the effective temperature is generally used/quoted as the surface temperature. In fact, the exact location of the surface of a star is located is unclear as the star is gas or plasma and beyond the star is additional gas/plasma. The surface is generally taken as what appears to us to be the outside of the star, i.e., that part which produces the light we see, a layer of the star called the photosphere. As opposed to the center or deeper regions of the star, the photosphere is the portion whose temperature determines the spectrum and therefore color of the star. The photosphere has a some depth and the emerging light comes from a range of depths at a range of temperatures. The effective temperature is a relatively easy-to-determine quantity used to approximate this temperature range. Spectral lines, whose form and magnitude depend on temperature, can be used to determine more accurately the photosphere's temperature at different depths.
For planets, the surface temperature is more defined, especially for rocky planets. The reflection of electromagnetic radiation affects observed spectrum, such that the effective temperature is not such a good indicator of surface temperature. The spectrum must be further-analyzed, presuming there is a black body contribution from the solid surface and the atmosphere produces temperature-dependent spectral signatures such as absorption lines.