TL;DR This answer suggests opening a local bank account. This is a good option if you visit regularly, which is to say that you're going to visit the country at least a few times over the next five years (less than that is probably too much of a hassle of getting and renewing the accounts, just that or more and it's already a good idea to save money).
The longer your stay, the easier it is to open a bank account. There don't seem to be many restrictions on it from the bank's point of view, so searching the internet for the most up-to-date information will pay off when you're not sure if you meet the criteria.
Using a local account
The cheapest way when you visit semi-regularly is to have a Thai bank account and wire the money in there directly from your foreign account.
The reason this is the cheapest is that you'll either pay no surcharge (ATMs from the bank that issued the card in the same district) or a much smaller surcharge outside the district or at another bank's ATM (20 THB at most looking through some of my transactions). In addition to that, you can use the card in many stores without any charge (though I don't know specifics and this may vary per bank and store).
The card itself also costs money, in my case (Bangkok Bangkok) it's 15 THB per month which is just taken from my account automatically. On a yearly basis, that's still less than the 200 THB charge for withdrawing cash using the foreign card.
Opening the account
The difficulty lies obviously in getting the account in the first place. As it turns out, it's not that hard, apparently businesses are quite happy to take your money and maybe give some of it back later providing they can take some of it (all those charges).
This one you'll mostly have to research yourself, but from what I read online the banks really are easy when it comes to opening accounts. Note that the rules vary per branch and maybe even per person at the desk, so the best way to get it is to know beforehand which branch to go to and what you need.
This blog on askchiangmai.com lists a work permit, a letter from Immigration with your Thai address or a letter from the embassy confirming the validity of your passport as requirements (only needing one) to apply for an account. They also recommend bringing as much items confirming your connection with Thailand (e.g. local Student cards, longer term visas, utility bills, etc.) as that might make it easier.
In my dealings with those behind desks (officials and employees) in the country, I've found that it's also a good idea to make a lot of copies. Whenever you're with an official (at a desk, not at the immigration booth at the airport ;) ), you can ask them to stamp it and add a little signature (just show them a picture of a stamp on your phone and make a stamping kind of motion on your copy) and they'll probably be happy to help out. Just make sure to stay friendly and smile, even if they can't help.
If you are eventually successful in getting the bank account, you're set. ATM cards are generally valid for 5 years and you get a little booklet that you can pop into machines similar to an ATM to update your transaction log (as it were). Just make sure to keep enough money on it for the fees and you can always pop in to the same branch that issued your card (not sure about others, best to go to the same branch) to renew it.
Putting the money in the account
Getting the cash in there is easy. You can either use a Swift payment, easy using internet banking from your own account / assisted by your own bank, but possibly with a bad exchange rate (because your bank can set the fee and we saw earlier that they like taking your money).
A better way is to use an online payment provider that's clear about the rates they provide. An example I used in the past is TransferWise where you just enter the info of the destination account, say you want to transfer money to yourself (important because of laws and such) and then you pay using one of the many ways you'd normally pay online.