Green dot on photos when taking photo facing the sun
This is probably a better question for photography, not physics.
I believe that green dot is a lens flare. It's the effect of the sunlight reflecting off of the optics that, in an ideal world, would not reflect at all. Its position and size are based off the angle between you and the sun and the particular position of the elements in your lens.
As for whether its bad for cameras, you can damage your CCD that way. It is recommended that you avoid shooting directly into the sun. However, sometimes you can get away with it, especially near sunset where the brightness of the sun is at a minimum.
The lens elements in a camera contains anti-reflection coatings (thin films). Although they are intended to remove all internal reflections, they are not perfect. Their effectiveness generally depends on incident angle and wavelength. When you photograph an intense source of light, such as the sun, the little bit of light that is reflected is enough to show up in the photograph and the color is an indication of the wavelength dependence of the particular coating.