From the Super Mario Wiki
The Pianta prosecutor is a Pianta in Super Mario Sunshine. He is a Pianta that encourages the order of Mario's guilty verdict. He states his opinion of the vandalism and is the possible cause of Mario's community service job.
He only appears in the game during the courthouse and ending scenes.