That's a broad question. The answers vary depending on the type of photography in question. If you're talking about being at the right spot at the right moment (I.e., a disater strikes), as some responded to, that will be luck (unless you're an ambulance chaser. Even then you won't be on the spot as it happens.). The part that isn't luck is a photographer (and especially a photojournalist) ALWAYS has his/her camera with them, loaded and ready to shoot. (As a photojournalist, I broke the ALWAYS rule this past weekend. My wife and I were out and we used her car. My spare camera was (that I ALMOST always have with me) was left in my car. Sure enough, we were in an area where a large fire had just broken out. We were on the scene before the fire department was. But it didn't matter, I had no camera and blew the CHANCE for some really good photos.
If you're talking about portrait photography, say in a studio, that would be, and should be, skill.
The actual photo taking (composing, metering, framing, etc.) in any situation should be skill. You should know enough about any given lighting circumstance, to be able to fire off some well developed shots. What the subject may be doing at that time, falls partially into the luck category, especially in shooting candids of people, or capturing wildlife in it's natural setting. You will lessen the "luck" factor the more dedicated you are. I know one photographer that spent a couple of weeks getting up every morning around 5 am and heading out into one of the state parks, looking to capture a really good photo of a deer. He got one. Was it luck? It certainly would of been if he went out just one morning and managed to get the photo, but he lowered the luck factor (odds) by being persistant. One could go on and on regarding this aspect for sports photographers (capturing a photo of a bat shattering during a baseball game), nature photographers and photojournalists.
I read a bio of one of the National Geographic photographers (I'll try and find his name and add it later), who shoots hundreds of photos of one subject he's covering for one or two photos. He's had comments directed towards him that anyone that shoots that many photos will get lucky and be able to get one or two good photos. His answer goes something along the line like, ...it's important to take photos so that "every shot" is a good shot, but he's looking to capture the "best of the best". The decisive moment, that makes one photo stand out amongst all the rest.
Luck comes mostly into play if you are a photographer who always relies on the automatic settings of a camera to do the work for you.