A bit of a multiheaded question here, but it didn't quite justify being four different questions.
- Is it possible to get a shiny legendary pokemon in the Pokemon games?
- If so, when is it generated?
- Does the overworld sprite reflect the shiny status?
- Does this vary by generation?
3 Answers
Yes, it is possible to get a shiny legendary.
For an interactive legendary, the overworld sprite will not reflect the shiny status. It is generated when you initiate the battle, which is why some people save in front of the legendary, battle it, and reset until it's shiny (a process called soft resetting or SRing).
For a roaming Pokemon, the conditions occasionally vary. Typically it's set when you first encounter it and it's registered in your Pokedex.
2After 5th generation, most of the main, story line Legendaries in the the games (like for instance Groundon, Kyogre, Raquazza and Deoxys in ORAS) are shiny locked, meaning they cannot be shinies, or rather they have a 0% chance of being a shiny.
However most other legendaries that you find in various locations after you have completed the main storyline can be caught as shinies. The overworld sprite does not reflect shiny status on these pokemon, and the chance of a shiny is generated every time you encounter them, which is why soft-resetting works.
As for generation changes, the only think that has changed is the chance of a shiny being generated, which halved in 6th generation. Since you can't breed legendaries, the breeding method doesn’t count, and for the same reason neither does wild encounter or chaining.
3The Shiny attribute on a pokemon can generated from anyway you would normally catch a pokemon, egg or in battle. The odds of this are 1 in 8,192 for battles. Some people believe that it must be the first time you encounter that particular species for the first time. There is no evidence to support this.
Starting with 4th generation games, the odds of receiving a shiny pokemon actually increase with the number of battles you're in if you use the PokeRadar. This is known as "chaining." Chaining has been shown to be effective up to chains of 40. You'll know it has worked because the grass will glow instead of shaking.
Additionally, 4th generation games provide for breeding between different nationalities of pokemon. This has been shown to increase the odds to 1 in 2,048 (a significant increase).
If you'd like to know more check out Serebii.
8