To me, if a paper underwent appropriate peer review in a reputable journal, the remaining viewpoints are of feedback from the readers and users. This is why publishing in a reputed journal is highly advisable.
Since no man is infallible, criticism of published papers should be done to correct and not to insult or humiliate the authors as Tapas has said it. The arguments should be based on facts.
What is a right way to criticize a published paper?
Possible right ways include:
Some journals provide process, procedure or approach how one can provide constructive criticism in relation to a specific published paper - so you can provide your write up and sometimes your useful comments will be published also.
You can also criticize a published paper through your new literature review or new empirical / published research to falsify the previous published paper's contents e.g. flaws in the theoretical framework, research instrument wrongly operationalized, handicap in data sets collected, misinterpretation of the test results analyzed etc.
Embrace the mindset to positively criticize for the betterment of research community / knowledge contribution & to help the previous author to improve rather than to downgrade him / her.
If you have data to prove that the published paper has erroneous information, (i) you can publish your rebuttal as part of the "Letters to the Editor" in the same journal, OR (2) write an email directly to the author with you comments, concerns and questions.