For the most part, finding shinies in go are random, just like anywhere else. The odds are about 1/450.
However, they do have boosted odds in raids and events, such as Community Days, which happen once per month. Community days have odds of 4%. Source
Also note, some Pokemon are shiny locked.
Source, and Experience
You can check here for more detail on the odds, but yeah, basically it's just random outside of events.