Luminosity is a measure of energy flux. This is the rate of flow of energy per unit area per unit time from the surface of the body. Luminosity depends both on the temperature of the body and the size of the body. We assume that a body like the Sun emits radiation effectively as a black body. This means it can be modelled using Stefan-Boltzmann's Law.
L ∝ R2Teff4
Which gives us L = 4πR2σTeff4
Where Teff = 5777 K and Stefan-Boltzmann constant: σ = 5.670400 × 10−8 W·m-2·K-4
Example: What is the Solar luminosity at the surface of the Sun?
Radius of Sun: Rsun = 6.96 × 108 m
L = 4 × π × (6.96 × 108 m)2 × 5.670400 × 10−8 W·m-2·K-4× (5777 K)4 = 3.85 × 1026 W