If you come by plane, then probably it is best to come through Tallinn – the capital of Estonia. AirBaltic is one of the cheapest airlines here.
There is a good connection between Tallinn and Viljandi either by bus or by train. The ride is approximately 2 hours 15 minutes. Depending on which option you choose, please read also Getting there by bus or Getting there by train, respectively.
Some long-distance buses entering or leaving Tallinn via the Tartu road also have a scheduled stop at the airport. A few buses to Viljandi make a stop at Tallinn Airport. So you do not need to go to Tallinn Coach Station. However, not all buses have on-demand stops at the airport, meaning that you should make sure to choose the correct line. More buses to Viljandi leave from the Tallinn Coach Station.
Tallinn Airport is very close to Tallinn coach station and the centrum.
From Tallinn Airport, just in front of the terminal, you can take a public city bus line no 2 to the Tallinn coach station. You can buy a ticket from the driver in cash only (~2€, better have coins and smaller bills ready).