When flying in front of a cloud, it's indeed Glory, like ETOPS said. Simply put, the sun hits water droplets and the rays get dispersed in all directions, but not all colors are refracted into each direction. It's the same effect as seeing a rainbow.
When flying over ground, the effect is slightly different. You have the same thing when walking over (tall-ish) grass, and looking at your own shadow.
The reason is that at any angle, part of what you see is grass illuminated by the sun, and part is grass that's in the shadow of other grass. But if you look almost directly away from the sun, the grass shadows are hidden behind the grass that's illuminated by the sun coming from your direction. So you see far less shadows than elsewhere and that gives a halo-like effect around your own shadow.