Can plasmas be black bodies? I have recently heard the claim that sun can not be composed of plasma because plasma can not be a black body.
I am an uneducated layman, I've seen a lot of people (laymen) deviate from accepted scientific consensus. I am skeptical and I don't have enough knowledge about physics to argue it.
 A: Plasma in many concrete cases often is not a black body, e.g. plasma in Earth's ionosphere, or in a discharge lamp, or in tokamak. This is because plasma in these cases is very thin (rarified gas), and not a good absorber of radiation, as there is not enough layers to make it absorb close to 100% of incoming radiation and make it opaque.
However, if enough plasma layers are present in a plasma "cloud", it can become good absorber (opaque) and with additional assumptions, it can become close to a black body in its radiation characteristics (which is an idealized theoretical concept that does not exist in reality). Sun is very large and density of plasma is believed to increase towards its center, so after some large distance into the center, there is enough plasma between our eyes and the rest of the Sun, that it makes that plasma non-transparent and close to a very good absorber. This layer of plasma on the "surface" of the Sun beyond which we can't see (due to good absorption in the layer) is called photosphere. Its thickness is claimed to be around 300 km, so this is an estimate of how much of the Sun surface plasma is needed to make it opaque.
A: The argument is silly if the claim is that plasmas cannot appear anything like blackbodies, since there are observable examples like the Sun.
To be a blackbody, a volume of plasma needs to come into equilibrium at a reasonably uniform temperature and to be thick enough that it will absorb all radiation incident upon it at all wavelengths.
From your comments, it appears that the source you cite disputes that plasmas are capable of producing a continuous spectrum, or equally from absorbing at all wavelengths. This is clear nonsense that can easily be demonstrated in a lab; there are many plasma processes involving free electrons that can emit or absorb a continuous spectrum. Examples include thermal bremsstrahlung, Compton scattering and photoelectric recombination.
Near the solar "surface" the dominant process is the formation of H$^{-}$ ions, created by H-atoms capturing free electrons ionised from alkali atoms. This emits a recombination spectrum across the visible region and its inverse process, the photoionisation of H$^{-}$ ions, provides the continuous absorption that makes a few 100 km thickness of the plasma effectively opaque.
The reason the Sun isn't a perfect blackbody is not because it lacks the basic mechanisms to absorb at all wavelengths, but because it is not isothermal on the length scale at which it becomes opaque to radiation. A better example of an almost-perfect blackbody is the cosmic microwave background, emitted by the cosmic plasma when it was at temperatures of 3000 K. Here, the temperature was almost uniform across the universe and the plasma was opaque to its own radiation.
A: A necessary but not sufficient property that a volume of emitting atoms and molecules needs to have, in order to emit light as a blackbody is that they are in local thermodynamic equilibrium (LTE) with a single well-defined temperature.
In many cases this is just an idealization and even in earth's stratosphere and beyond the molecules are too rarefied to be in local thermodynamic equilibrium (non-LTE).
In such a case the emission is determined by looking at how fully the different energy levels of the molecules and atoms are populated.
An important application of this are e.g. lasers.
The precise emission spectrum of the sun in terms of irradiance is the so-called Kurucz-spectrum.
