How does a PhD student make meaningful comments or suggestions regarding a professor's work?
The other answers make good suggestions for the asking of questions or posing ideas to professors. Most professors are open to questions and new ideas. I personally love it when my students come to me with something that I hadn't thought of before. As for getting recognition, it depends on the relationship between the Ph.D. student and the professor.
If you, as a grad student, ask a poignant question at a visiting professor's lecture, and then the professor returns and gets his or her group working on the matter, the you will very likely not receive any further communication about the matter. You will, however, be able to determine if your question had an effect when the publication came out. If nothing else, you can have that warm little feeling that something came of your question.
If you, as a senior graduate student, pitch something to your adviser that is relevant to your project, your adviser should listen. At some point you know more about your project than your adviser does. I pitched many things to my adviser over the years. Sometimes I was shot down, and then did them anyway. One of my questions, however, transformed the direction of my thesis work. I started and finished a whole new project in my last year based on an idea I pitched.
Senior graduate students weighing in on other projects going on in their group also tend to get listened to, and occasionally acknowledged in the publication for "helpful discussions." Yes, sometimes those names are graduate students. For one example I know of, see the acknowledgements in this article. "The authors would like to thank... ...Mr. Benjamin N. Norris for helpful discussions."
From my perspective, even a good question at a department colloquium will make a student stand out. Often, a student will ask a question or make a comment that I've thought about but didn't bother to mention. That is also something that catches the eye. Ultimately I think that Bravo's point is a good one: just try to think about the problem and comment if something comes to mind.
Very very carefully. One of the important aspects of being a PhD student is learning how to think critically. Turning that critical eye on a colleague, and even worse on an advisor, can be a real disaster. The key is for the student to be able to provide his/her insight into the issues without putting the colleague on guard.