A 5 year old should be potty trained and out of diapers in the day if they have no medical issues.
However it's okay for a 5 year old to wear diapers if they need too or want too.
Some 5 year olds may need to wear diapers for incontinence, autism or for bed wetting.