1.I understand that star is in Plasma state (all nucleus and electrons are not bound to each other and moving around freely)
While hydrogen only has one electron, all other neutral atoms have more than one electron. When one electron is removed, this is referred to as the "first ionization". Removing one of several electrons from an atom still makes it plasma. Also, the term "plasma" is used when a substantial fraction of the atoms are ionized, not necessarily all. So in the sun or other stars, there are still electrons bound to nuclei, as well as free electrons.
For these reason, in the spectrum below, one still sees lines from transtions between electron energy levels of atoms.
2.Photon is emitted when an excited electron moves back to lower orbit.
Yes, and absorbed when going to a higher level, that is why we see the lines in the above spectrum.
3.So in a star if electrons are not in any orbit then how can photons be produced?
The main reason is that gamma ray photons are produced in the core of the sun by hydrogen fusion to helium, and create a cascade of lower energy photons as they travel to the surface. Also, all materials emit black body radiation. The overall shape of the above spectrum fits well to a black body model.