Before a child can legally ride in the front seat the child must weigh at least 80 lbs and be between 4'9” tall.
The child must also be at least 13 years old to legally ride in the front seat and for safety as well.
A child under 13 can be killed by the airbag in the vehicle in the front seat but if the child must sit in the front seat and is under the age of 13 then you should shut the airbag off if possible.
Some vehicles have the option of turning the front airbags off so that the child can sit in the front seat without harm should the airbags deploy in an accident.
If the vehicle has a back seat it's best for the child that is under 13 years old to sit in the back seat.