Yes, it can damage your camera on the long run because the lens will act as a magnifier glass, directing the Sun rays straight to the inside parts of your camera. Of course a shot here and there will not Destroy your câmera, but several Pictures might. Avoid long exposures and you should be ok. Also, remember you can damage your own eyes looking directly at the sun.
It can damage the insides of your camera (sensor and shutter curtains, mainly).
Now if you are Just asking about leaving your camera sit under the sun, not taking Pictures, it definitely can damage your camera as well, as everything that stays under the direct Sun rays can get damaged. It can overheat and also spoil the plástic used in the built of your equipment.