Why is conc. HCl used in flame test? - QS Study
QS Study

In flame test compounds of some metals, in presence of conc. HCl, form different colored flames. In this test the compounds become volatile and then vapors form different colored flame’s. The purpose of using conc. HCl is to convert the compounds into their metallic chlorides. Because, the metallic chlorides are very much volatile.

When heated in the flame the elements of the metals of the compounds become excited and go to higher energy levels. Later when they come back to the ground state, they emit extra energy as visible light. As a result flames of different colors are formed for different metals. Such as for Na golden yellow, for K lilac violet, for Ca brick red flames are found.