Interesting question. The sun is an almost perfect black body with a Planck spectrum. It radiates more in the yellow region of the electromagnetic spectrum than in other regions and our eyes have evolved on Earth to see it. That's why the sun is yellow. Yes, it would look whiter from space, because the Earth's atmosphere scatters away a lot of the blue light from the sun, making it look redder than it is.
I hadn't thought of the bunsen flame before and this sounded interesting. No one has yet answered why a bunsen flame is blue exactly. The fact that the flame has a lower temperature and a different colour, meant that it could not have a black body spectrum, which means you cannot strictly characterise it by a single temperature. Sure enough, according to
the bunsen flame has several molecular radicals in it which are responsible for the colour (through excitations and de-excitations of electrons in these molecules, or through rotational and vibrational energy levels). Further, there is a bit of the spectrum that can be identified with "thermal emission", i.e. emission from gas in thermal equilibrium, where now a temperature can be defined and is probably the "temperature' that you quoted. That component would have a black body spectrum and would probably have a peak intensity somewhere in the infrared, rather than at blue wavelengths.
So, the blue of bunsen flames is due to molecular radicals.
The yellow of the sun is the peak of the thermal radiation.
Also, it is quite irrelevant to the colour of an object as to where it is getting its energy from. Whether something is burning coal or gas or nuclear energy, it is immaterial to the colour if the object is in thermal equilibrium (i.e. has a characteristic temperature). Of course, it matters if there are "filters" as someone pointed out, which can slectively radiate certain colours (like the CH radicals in the bunsen flame!)
Again, the sun's atmosphere is pink almost certainly due to similar "filtering" effects of the gases in it. I can't find information on it yet.