Widyaratne was appointed to the post following the resignation of Karunasena Hettiarachchi.
An old boy of Saint Thomas' College, Mt Lavinia, he graduated from the University of Colombo (Bachelor of Arts – Economics, Master of Arts – International Relations) and the Sri Lanka Law College.
He has served as a solicitor in the United Kingdom. He also served as a Trial Attorney at the United Nations International Criminal Tribunal for the former Yugoslavia from 1998 to February 2003.
Waidyaratne has also served in Fiji as a judge of the Court of Appeal and also served as a Trial Attorney at the United Nations International Criminal Tribunal for the former Yugoslavia from 1998 until 2003.
He Joined the Attorney General's Department in November 1983 as an Acting State Counsel and promoted to the post of Senior State Counsel in 1996. He was promoted as Deputy Solicitor General in 2005 and promoted as Additional Solicitor General on December 11, 2013. He was appointed Senior Additional Solicitor General on January 24, 2015.