>>34690705There's a sidequest in USUM that kind of addresses that question, but not too deeply. At some point, you can visit the Hau'oli police station and find Ilima there, along with a few Hypno. Apparently, they've been arrested after being caught breaking into his home and stealing something. You help Ilima deduce which one of them is responsible for the crime, and in the end,
Ilima lets them all off with a warning if they promise to be good from now on.
I'd say that sidequest proves that Pokemon actually can get arrested and tried for crimes in Alola, but I don't know how it would work in other regions. Also, it may be that only some Pokemon are subject to the legal system, or there may be different laws for different types of Pokemon. For example, Hypno may be subject to laws that a Rattata isn't, because Hypno's a lot more human-like than a Rattata.