There's an apocryphal anecdote circulating among photographers about a "socialite" complimenting a photographer's work, saying "you must have a fantastic camera." Later, the photographer returns the favor, complimenting the dinner she served by saying, "you must have a fantastic stove." (Recently I heard it attributed to Ansel Adams.) The obvious message is that when someone says this about our photography we should be insulted and condescending.
Please watch your step as you dismount your high horse.
Photographers should know that most people do not look at photographs with the same critical eye as those who produced the image. (Some even count on that fact, judging from some of what passes as family portraiture.) When people make this statement they are expressing their appreciation of the image, even though they may not be able to articulate what it is that makes it special to them. They're ordinary people, not art critics. Chill.
If we silently roll our eyes when we hear this we are missing an opportunity to accept a compliment and maybe impart a bit of knowledge. By graciously saying, "Thank you. Let me tell you what I particularly like about this image" we might begin a dialogue in which we learn how non-photographers view our efforts and politely teach a lesson on composition and light.
Not to mention, we avoid looking like self-important jerks.