Pharmacoepidemiology studies are increasingly used for research into safe prescribing in chronic kidney disease (CKD). Typically, patients prescribed a drug are compared with patients who are not on the drug and outcomes are compared to draw conclusions about the drug effects. This review article aims to provide the reader with a framework to critically appraise such research. A key concern in pharmacoepidemiology studies is confounding, in that patients who have worse health status are prescribed more drugs or different agents and their worse outcomes are attributed to the drugs not the health status. It may be challenging to adjust for this using statistical methods unless a comparison group with a similar health status but who are prescribed a different (comparison) drug(s) is identified. Another challenge in pharmacoepidemiology is outcome misclassification, as people who are more ill engage more often with the health service, leading to earlier diagnosis in people who are frequent attenders. Finally, using replication cohorts with the same methodology in the same type of health system does not ensure that findings are more robust. We use two recent papers that investigated the association of proton pump inhibitor drugs with CKD as a device to review the main pitfalls of pharmacoepidemiology studies and how to attempt to mitigate against potential biases that can occur.