Out in the wild? It's just random.. Good luck getting one, the chances of getting one are, I think, 1 out of 8192. Luckily for me, I found a shiny Tentacool in Pokemon Emerald, when I was Surfing the waters..
Well, if Du want a shiny legendary, I hear Du can save before the fight and keep restarting. I think for legendaries, there's a higher shiny rate! :) Guess what shinies I have!... None! But my little sis found a yellow geodude! :)
Really just random, bro got a bacwards colored Torchic on Ruby and a red insted of green Snover on his Dimond version, I got a shiny Tenticool (now Tenticrule on Battle Revolution) on Platnum, a shiny Poochyena that stayed Gold on Emrald, brown Machop on feuer red, green Doduo on my first run at Leafgreen, reverse Medditite (and if Du dk what it means, red Meddite, blue Medicham) and a green Espion on Pearl