Viilma was ordained a deacon on 2 May 1993 in St Michael's church in Keila by Bishop Einar Soone.
On 15 September 1998 he was ordained a priest in St Mary's Cathedral, Tallinn by Archbishop Jaan Kiivit Junior.
On 26 November 2014, he was elected to the Estonian Evangelical Lutheran Synod by the archbishop.
The same year he was appointed as deacon in the parish of Parnu-Jacobi, holding this post till 1998.
Later he also held various positions within the Lutheran church of Estonia notably the head of the council of the Diocese of Tallinn between 2010 and 2015.