How does a PhD student make meaningful comments or suggestions regarding a professor's work? So bobthejoe said this:


  The PhD students I remember the most are the ones who came up to me
  and made meaningful comments or suggestions regarding my work. They
  get extra bonus points if in the middle of the night the next week
  they offer more meaningful comments or suggestions.


Here's the question though: how many PhD students actually manage to make meaningful comments or suggestions about a professor's work? And how often does the professor follow up and inform the student that those comments are helpful (rather than pretend that the comments are helpful as a matter of politeness)? And if the comments are implemented, does the professor ever notify the student?

I'm saying this as someone who makes a lot of suggestions/comments to other people, but who can never be sure whether or not they find them helpful. Most suggestions seem to be discarded simply because it takes too much time/effort to implement them.
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."