The age that it is no longer considered acceptable for a child to have on just a diaper is around 4 years old or above.
Most people tolerate babies and toddlers up to around 3 years old wearing just a diaper without any clothes in public.
Although I see nothing wrong with a kid or child, baby or toddler wearing just a diaper in public or anywhere else some people are disgusted by it no matter the age.
Usually though by the time the child is 4 they are potty trained and are no longer wearing a diaper at least during the day.
My nephew who is 6 sometimes stays over at my house and he wets the bed so he wears a diaper for bed wetting.
He will get the diaper put on a few hours before bed and run around the house here and at his own house with just the diaper and shirt or sometimes just the diaper.
Then he sleeps in the diaper without any pants or Pajamas when it's warm.
I find no issue with it although some might.
For public though it's best to stop taking the child out in public in just diapers after age 3 although there's really nothing wrong with it past that age or at any age.
After age 4 though the child may begin to get teased by other kids in public if they are seen wearing just the diaper so it's more of a thing about protecting the child.