Does it still make sense to reply to not so recent publications? Is there a cut off? When is a publication (paper or book) considered to be a recent publication? Does it still make sense to reply to publications, even if they are not so recent, or will it look silly to respond to something someone else has written 40 years ago, (assuming the debate surrounding this topic is not considered to be of prime importance anymore)

I am not talking about referencing that work, but directly responding to it, published in the same journal, entitled (for example): A response to X... 

My field is Political Science / Political Theory.
I was sent a reply article like this to referee recently, and I hope my experiences will provide from guidance.  The original paper was in theoretical physics and was published in the early 1980s.  The journal editor who contacted me informed me that, as a matter of procedure, they would normally send the submitted reply to the author(s) of the original paper as well as one or more additional referees.  However, the journal had actually been unable to locate the original author, because so much time had passed.

One of the key questions the editor wanted me to address was whether it was worth publishing this reply article now, more than three decades after the first publication.  I read the short reply and determined that its criticism of the original article was technically correct.  The paper had misstated the precision of an inferred constraint by about a factor of two.  However, I still advised the editor that the reply was not important enough to publish.

The reasons for this were several, and if you are interested in writing a reply to an older paper, I would suggest you think carefully about whether analogous arguments could be made against the publication of your own work.  The first reason was that the error was relatively minor.  Yes, it was a genuine error; but no, the major results of the first paper were not materially affected.  The second reason was that the original paper had not had a significant impact on the field; it has less than five citations, and none of the papers citing it made use of the erroneous result.  The third reason was that, because of more recent work, the old results had been superseded anyway.

If you want to reply to an influential work, which you felt has made some kind of logical or methodological errors, there may be valid reasons to publish your reply, even if decades have passed.  However, if the errors are minor or the original work's influence on the current state of the field is small, I would not suggest that this would be a good use of your time.