When is it appropriate for a PhD student to discuss personal problems affecting his productivity with his advisor? I had a very difficult personal problem. My head was not in the right place, and outside of getting through my administrative duties, my brain just couldn't function the right way to run wet lab experiments and come up with good research ideas. As a result, I did not work as much as I should have, and when I did I was all over the place. I concealed my emotional pain pretty well, and put up a good face while in the office/lab, so no one suspected personal problems, but my work definitely suffered. My parent's illness looks to be getting better now and after some counseling I feel like my life is back on track. 

However, I feel like it is possible that my advisor's opinion of me has greatly declined due to my lack of productivity in the past. Would telling your advisor about personal problems, after they are over, with the intent of the advisor understanding a lack of productivity be appropriate? Would doing so just sound like excuses and make things worse?  I assume it would have probably been better if I had mentioned it back when I was going through the problems, but is it a good idea to mention it now, or just cut my losses, work hard and hope he forgets about those unproductive years. 

So my question is. When is it appropriate to bring up personal problems with an advisor? In this case and in general?
As soon as possible. Problems are made to be transcended, not pushed over time. You already said your adviser is a cool guy, right? Go ahead and talk with him, say the truth.

It's a long said term, even cliche sometimes, but the first step to change is recognizing that you have a problem. You already recognized you have it, so now it's time to fix it. Don't be afraid of what he'll think about you, what really matters is that it's true. If he can't understand your situation, then he doesn't really know how to be a adviser.

Also, you're a student, you're there to learn. Better learn now where you can be mistaken with no serious consequences, then out there, where your problem can really damage you financially and/or much more emotionally, since people don't know how to handle with other people's problems, or know and just don't care.