Photography to most people is an art, and art is of course subjective. So what makes a photo good or bad is whether or not you like it. Of course there are some who analyse the focusing and exposure, but a technically perfect shot is not necessarily a good one, nor is it necessary for a good photo to be technically perfect - unless the purpose is to illustrate something, eg as in a science instruction...
I think a good photograph starts to be good if the photographer imagined what he wanted then achieved it. Next, if others see what he sees and likes it..
I call it the "Kodak Moment" for lack of a better word, but that moment can take a lot of thought and can then coalesce into an image you imagine, and then you create the image both in the camera and digital darkroom, ending up with that original imagination or even something better..
Good exposure and sharpness is one small part of the technical end of it. It contributes, but doesnt make it a great photograph...
What makes a painting good? A sculpture?.
Depends on a million things..
With photos, much more often than with paitings and sculptures, there's the assessment of whether or not a photo accomplishes it's purpose..
Does it "sell" the refrigertator? Does it "sell" the dress? Does it convince the magazine reader that the person in the photo is a crook? Or a saint?.
Is a photograph worth framing? If so, it's probably pretty good..
Would an editor publish it? Editors select pictures for a variety of reasons, including things like which shot is the right shape for the hole on the page. But the editors also have lots to choose from, so if one picture gets published, it's probably good not only in absolute terms, but in relative terms, compard to all the other shots the editor could have chosen..
That's just one VERY specific area of photographic use that is usually based on commercial and/or time restraints...