This is actually two different questions. First, does drinking a lot of coffee affect the joints, and second might too much or too little water intake affect the joints.
The coffee question is interesting to me because I have had a couple episodes where I was eating very badly or very little and drinking lots of coffee and my joints, in particular my hands, started hurting. I never found any "hard" science evidence that coffee would affect the joints, but many of the more holistic type health people said that lots of coffee will affect the mineral balance in the body which may then affect the joints. (As the previous respondent noted vis-a-vis calcium. But I think other minerals were said to be involved as well.) Arthritis is related to mineral activity in the body so this may be a factor.
Being dehydrated or overly hydrated can affect the mineral balance in the body too. Over-hydration can be quite dangerous because you excrete minerals with the urine. But more than that I don't know.