Q:

Do we need dark matter and dark energy, if the behaviour of the universe in its initial stages was similar to that of the Sun?

According to CMBR the universe was a cloud of plasma and was a perfect black body, $380,\!000$ years after big bang.
But the Sun in our solar system also is in the state of plasma, thus making it a blackbody. So it is possible that the universe in its initial stage also behaved similarly(I.e. radiated the energy produced as a result of fusion reactions during the recombination epoch beyond the boundary of the plasma). And this is the reason we find find less baryonic matter than we should. Thus making the concept of dark matter irrelevant.

A:

Short answer: yes.
You should look in to the history behind the dark matter hypothesis. It started not from the examination of cosmology and the CMB, but from the motion of galaxies in clusters and stars orbiting around galaxies. See, the vast majority of ordinary matter in every galaxy is contained in the gas between the stars, not the stars themselves. Because of that, we can get a decent handle on how much ordinary matter is around by observing that. Tools for this purpose: the 21 cm line of atomic hydrogen, when the gas is cold, as much of it is in spiral galaxies, and looking at the x-ray spectrum when it is exceptionally hot, as it is between galaxies in large clusters. 
When we examine the way the parts of galaxies, and the galaxies in clusters, move, they're travelling way too fast. If the mass we can see direct evidence for is all there is, the clusters would not be able to hold on to their hot gas and galaxies, and the galaxies would not hold together, either. 
"So what? Maybe the matter is there, it just isn't giving off light." Trouble is, if it were hot enough to be a plasma, and thus lack spectral lines, we could see it directly. If it were too cold to be a plasma, it would block light from galaxies and quasars in the background more in the matter's spectral lines. So whatever is producing this extra gravity has to neither emit nor absorb light in any way we've been able to detect. 
It just so happens that adding dark matter (or something very like it) to the cosmology simulations is also essential to explain the CMB data.
Now, you may object that the extra gravity we've observed may have some other source. For instance, maybe Newton's law of gravitation is simply wrong on the scale of galaxies and larger. The trouble that idea runs into is you're no longer able to explain the bullet cluster, where the gas between the galaxies has collided, but the dark matter and galaxies did not. 
On the subject of black body spectra. The black body is the spectrum that a gas of photons assumes if it is in thermal equilibrium (constant uniform temperature everywhere). The CMB is very very nearly a black-body because at the time the differences in temperature between any two parts of the universe were very very small. The sun, however, is surrounded by a very cold vacuum, and that lack of equilibrium will inevitably cause the spectrum to deviate from the ideal Planck function.

A:

But the Sun in our solar system also is in the state of plasma and yet doesn't act like a blackbody

Wrong, the sun radiation is approximately fitted as a black body. The word "black body" does not describe the frequencies, but  the assumption that it absorbs all radiation falling on it and  re-emits it.
Here is the sun, and it fits the black body formula approximately.

Solar irradiance spectrum above atmosphere and at surface. Extreme UV and X-rays are produced (at left of wavelength range shown) but comprise very small amounts of the Sun's total output power.

Plasma is also described by black body radiation.

so it is possible that the universe in its initial stage also behaved similarly. And this is the reason we find find less baryonic matter than we should. Thus making the concept of dark energy irrelevant.

This is wrong, as seen above because your premiss is wrong, but also, dark matter is necessary to fit the newtonian rotational curves of galaxies, and more observational evidence can be found in this link.. 
Dark matter is a completely classical observation of newtonian and general relativity. Baryon asymmetry comes from quantum mechanical knowledge of the content of the classical masses, and does not involve dark matter in any meaningful manner.

