There are 4 operators in Tajikistan: Babilon-M, Megafon, Tcell and Beeline. Coverage strength varies a lot. Babilon-M and Beeline come recommended in Dushanbe, but for instance in Murghab, Megafon and Tcell are better. A difficult choice for travellers. Locals who travel a lot carry 2 or 3 sim cards. Roaming with your western sim card should work (but is very expensive), but funnily enough, roaming does not work with a sim card from a neighbouring country.
In general, Megafon is a good choice.
Getting a sim card
Sim cards are very cheap, but new restrictions make buying a sim card more problematic. You have to show your passport when registering a sim card in Tajikistan and leave a digital fingerprint. You need to have a minimum visa length of 30 days as this is the minimum length of a contract.
Mobile internet is not so expensive and if you can get a good signal, it should be fast enough to do research and stay in touch with people. 3G is available in the major towns. In Central Asia you need to always discount 1G compared to the Global North, though. 4G = 3G and 3G = 2G. Dushanbe has coffee places with wi-fi, your accommodation might have decent wi-fi too. There are internet cafes in places like Khujand, Penjikent and Khorog but not in Murghab.
Right now, Megafon is recommended for mobile internet on the Pamir Highway.
Internet in Tajikistan, like elsewhere, is filtered. You are being watched and unwanted websites are blocked. Social networks are sometimes blocked. Good proxies and VPN’s on the Silk Road are Psiphon and HotSpotShield (other recommendations are welcome).