Yellow colour flame in flame test indicates that the alkali metal must be sodium. It reacts with 02 to form a mixture of sodium peroxide, and sodium oxide.
Ionisation enthalpy of sodium is low. When sodium metal or its salt is heated in Bunsen flame, the flame energy causes an excitation of the outermost electron which on reverting back to its initial position gives out the absorbed energy as visible light. That’s why sodium imparts yellow colour to the flame.