does a planet with atmosphere affect the speed of light
The gravity bends light. This has been tested and verified. This proves one thing. Photos do have mass. Once they have mass they should be affected when light tries to escape from a gravitational field. The lack of understanding of the light leads to several controversial statement. I don't know is there any measurements of speed of light under zero gravity in vacuum. There is a red shift phenomena of light well documented and used to measure the speed of stars, galaxies etc. If the assumption of constant light speed is true then one explanation could be the frequency shifts downwards towards red. This will reduce the energy of the light. A force reduces the energy. The energy reduction can be reduced speed or red shift. This is the only possible explanation feasible at this time. I strongly suggest read some research papers on this issue.
I don't think gravity effects the speed of light but atmosphere does. Light slows down when it passes through a medium. Gravity could make light travel further. When a massive object bends space, light will take a different course, but at the same speed.
Gravity has NO affect on the speed of light! Gravity DOES affect the space around matter, warping it slightly. So, if light from a distant star passes near the sun, it will be bent just a little, but it's SPEED remains the same. Einstein had the WORST time trying to prove this! He did it (with a LOT of help from many others) by observing the positions of stars during a total eclipse. With the sunlight blocked by the moon, observers could see stars behind the Sun by slightly to one side - just beyond the edge. As that starlight got farther and farther from the Sun, it appeared to jump a bit - it got out of the region of space that was being warped by the mass of the Sun. When light passes through matter, it WILL slow down. However, as soon as it leaves that matter, it resumes its original velocity.
Yes, light is affected by gravity, but not in its speed. General Relativity (our best guess as to how the Universe works) gives two effects of gravity on light. It can bend light (which includes effects such as gravitational lensing), and it can change the energy of light. But it changes the energy by shifting the frequency of the light (gravitational redshift) not by changing light speed. Gravity bends light by warping space so that what the light beam sees as straight is not straight to an outside observer. The speed of light is still constant.
The short answers to your two questions are, no, and, yes. Gravity has an effect on light, because it has an effect on spacetime itself, but it has no effect on the speed of light. A careful distinction must be made here: the speed of light in vacuum is always c, a universal constant. But light, being an electromagnetic wave, its speed can be reduced by passing through a dielectric medium, such as air, water, plastic, glass, etc. The quantity that relativity says is a universal constant is the speed of light *in vacuum* -- this constant is actually not a property of light, but of spacetime itself, and should probably be called, the characteristic spacetime speed, but that's just too big a mouthful. Any particle with zero rest mass will travel at this speed. It's just that, with the neutrino looking like it does actually have a non-zero rest mass, the photon is the only massless particle we know of at present. @ Allen The K: Actually it wasn't Einstein, but Sir Arthur Eddington who proved the 'bending' of light by the Sun's gravity, at the total solar eclipse of 1919, thus vindicating Einstein's General Relativity (GR). A competing theory had predicted twice the 'bending' that GR did. I've put bending in indirect quotes, because, as you and Trouble both acknowledge, light always travels in 'straight' lines -- geodesics -- through (curved) spacetime. So in effect, Sir Arthur was demonstrating the bending, not of light, but of spacetime itself. @ Trouble: You are right, regarding gravity not affecting the speed of light. But the bending of light in passing between media, is not diffraction, but refraction. Also, this has nothing to do with black hole evaporation (BHE); refraction is a non-quantum phenomenon, while BHE is a manifestation of an effect that is very much quantum in nature -- vacuum fluctuations, which are a consequence of the Heisenberg Uncertainty Principle.