Why the candle flame has no shadow?

A hydrocarbon flame is not a gas or a plasma, but rather a chemical mixture of wax, oxygen molecules, carbon dioxide, water vapor, hot air, and other stuff. The candle flame is actually a solid, a low density solid.

Because the flame is less dense than the surrounding air, it allows light to pass through it. In fact, a flame is about only 1/4 as dense as the surrounding air. This means that light can pass right through the flame without casting a shadow. Any shadow that may be created by the flame can be easily filled in by the glow of the flame itself.

That doesn't mean the the flame doesn't cast a shadow. The shadow is there is there, but you just can't see it. To see the shadow of the flame, aim at the candle with light source brighter than the candle itself and you will be able to see the shadow on the wall.