Mussa et al (2000) provide a list of factors that would favor a country pegging its rate: (i) low capital mobility; (ii) a high share of trade with the country to which it is pegged; (iii) the shocks it faces are similar to those facing the country to which it pegs; (iv) it already relies extensively on its partners' currency; (v) fiscal policy is flexible and sustainable; (vi) its labor markets are flexible; (vii) it has high international reserves.
In other words, to sustain a pegged rate a developing economy should have the capacity to perform well and flexibly, and maintain low inflation. Otherwise it would be advised to adopt a floating exchange rate regime, thereby allowing the exchange rate to act as an extra shock absorber.