An 8 year old boy can wear just a diaper and shirt and shoes outside in public, although it's not recommended as the 8 year old boy would likely be embarrassed to be seen in public wearing just a diaper and shirt and shoes.
8 year old boys are aware of social norms and being exposed outside in just a diaper, shirt and shoes would make most 8 year old boys uncomfortable as well as others around them.
While it's not illegal to let the 8 year old boy or other older kid outside in just a diaper, shirt and shoes, someone might get concerned and call the police and check on the welfare of the child.
Especially because there have been instances where parents forced their kids outside in just a diaper as punishment.