In the case of this illusion, the part of the photo where you see cyan, the green and blue cones become tired and as a result there is increased activity in the unfatigued red cones.
All the chemical and quantum reactions that make a flame glow can only happen where it meets the air, so even though they look like solid cones, candle flames are actually hollow.
You see behind the fountain, that tower that looks like a pyramid? It's called a Sikhara. It symbolizes the-the connection between the human and the divine.
But at night, there isn't enough light to activate these cones in your retina, and so your eyes rely on rods, which are much better at perceiving low light.
This is because it's right in the overlap between our red and green cone sensitivity, peaking at about 550 nanometers, making it a perfect option for visibility, but not exactly one for consistency with red meaning stop.
So what you're seeing here is in fact not yellow at all, but it's stimulating a mix of your red and green cones, which your brain interprets as yellow!