A bunsen burner attains a blue gas flame when there is enough oxygen for complete combustion.
When there is sufficient oxygen, the gas flame appears blue because complete combustion creates enough energy to excite and ionize the gas molecules in the flame.
In other words; increasing oxygen supply, less black body-radiating soot is produced as a result of a more complete combustion and the reaction creates enough energy to excite and ionize gas molecules in the flame, and a blue flame is formed.