The laws vary by jurisdiction. Many parents that I know believe it is illegal to leave a child alone if they are under 12. Maybe it is in some locations, but not where I live. In my state and town, there is no statutory definition of when a child can be left alone. However, there are explicit warning that negligent decisions can result in other charges.
And I think that is completely fair - some towns are safer than others, some children are more self sufficient than others, and every parent needs to make their own decisions. Hopefully educated and wise decisions.