The IAU has a conventional value for solar luminosity of 3.828×1026 W. (see Prša et al. 2016). This corresponds to an absolute bolometric magnitude of 4.74 (this includes all the light, including infrared and ultraviolet), and at a distance of 1 AU, that corresponds to an apparent bolometric magnitude of -26.84.
The value was derived from space observations, averaged over a solar cycle, These measure a solar irradiance of 1361 Wm-2, to within instrumental accuracy. This can be combined with the value of the AU to give the above value for luminosity.
Applying a bolometric correction of 0.10 (for a G2V star like the sun) gives the Wikipedia (sourced from NASA) value of -26.74. There does not appear to be any atmospheric extinction applied to this value, which should therefore be considered to be the value at the top of the atmosphere. Actual brightness will be somewhat lower.
There is physical variation in the brightness of the sun, most notably in the 11 year sunspot cycle. And the distance to the sun varies with the Earth's elliptical orbit, so on any given day the apparent magnitude of the sun may be more or less than the quoted value.