From Sonic Retro
To get the Ancient Light upgrade, head through the cave in front of the Mystic Ruins train station, going all the way through the tunnel until you get to the other side. There you will see Knuckles' Floating Island. At the entrance to the bridge going to the island is the Ancient Light Item. Get it and it will allow you to destroy the nearby Baby Kiki in the cage using the Light Speed Attack. This will open the gate and Sonic's seventh action stage, Red Mountain.
Sonic Adventure 2
For Sonic, while in the Green Forest stage, after you come off the second loop (half loop), you should hit springs and bounce onto the platform. When you land, run to the right, and you should find a 10 ring capsule. If you get close enough to the edge here, you should see one of the flying enemies. Simply do a homing attack on him, the item capsule behind him, and the item capsule behind that. This should land you on another platform where you will see the Ancient Light.
For Shadow, while in the Sky Rail stage, after the first ranching paths, go to the left where the Chao Container is. Jump over it and home attack on the appearing Beetles to access the top of the hill, where you will see the ancient light.