The city is too spread out to walk between sights. Autorickshaws (three-wheelers) are everywhere and cheap; agree the fare before getting in, or use Uber and Ola, both of which work well in Dehradun. The Vikram autos — six-seater shared autos running fixed routes — are the cheapest option but only useful if you know which number serves your destination.
A taxi for the day, hired from any hotel or stand, makes most sense if you want to combine Tapkeshwar, Sahastradhara, and Robber's Cave in a single morning — none of them is reachable on public transport.