Since ORAS is new, I will say what I know about Mirage spots. There's been some debate about the randomness of Mirage spots, but ultimately the Serebii list is pretty complete.
Different legendaries require different conditions to appear.
Cresselia - can be random, can be obtained from streetpass encounters
Zekrom/ Reshiram - have a Pokemon at L100 in your party
Kyurem - have Reshiram and Zekrom in your party
Lake trio - have 3 Pokemon with max happiness in your party (also limited to certain times; see Serebii link below)
Sword trio - have 3 Pokemon with max EVs in your party (also limited to certain days of the week; see Serebii link below)
Dialga/ Palkia - have Lake Trio in your party (Dialga for AS, Palkia for OR)
Giratina - have Dialga and Palkia in your party
Tornadus/ Thundurus - have Castform in your party
Landorus - have Tornadus and Thundurus in your party
Dogs trio - have Lugia and Ho-Oh in your party
As for the islands, it appears that they're random. Also note that if you save on a mirage island/ cave/ path (i.e. one that doesn't give a legendary, just other normal Pokemon), and open your game the next day, you will still be on that island and catch Pokemon there. Once you fly/ soar to leave, the island will disappear and a new one will appear for the day.
Also, turning on Streepass will you give more islands that do not hold legendaries (except Cresselia).
Serebii - Mirage spots
Serebii - ORAS legendaries (shows how to get Lugia & Ho-Oh)