why the currency crisis must occur at time t0 when the pegged rate equals the shadow exchange rate Explain why the currency crisis must occur at time t0 when the pegged rate equals the shadow exchange rate and not before or after t0.

Suppose the crisis were to occur at a date before and after t0 and examine the incentives of an individual investor. Is it in his or her interest to also sell the currency on that date?
I assume you are referring to first generation currency crisis models, a la Krugman. 

Before t0: Here there is of course no benefit to attacking and causing a currency crisis (by definition). That is, before the pegged currency is overpriced (i.e. it is not overpriced) there is no profit from attacking/short selling the currency as a drop in the value of the currency is not expected and therefore short selling is not profitable. So before it is profitable to cause a crisis there can be no crisis.

After t0: It would be profitable to cause a crisis and short sell a currency as long as it has not happened yet. However perfectly rational agents would react immediately, why wait? Like with investing in stocks, once you find a mispriced stock, you can profit anytime, but why wouldn't you profit immediately? Or lets say you find 100USD on the ground. You can profit from picking it up anytime after you find it, but why wait and risk that it could be too late later?

Hence it happens exactly at t0 as there is no reason to wait. An investor in currency would try to be faster than others to get arbitrage profits so others would try to be even faster than him and this goes on as much as possible. Its not possible to attack before (as its not possible to pick up 100USD found on the ground before its found there) so it happens as soon as it is possible, i.e. in t0.

In a second generation crisis a la Obstfeld it would take a coordination of several investors attacking at once to cause the crisis, so you don't have the effect of everyone trying to be faster than the other as they must "work together" to be successful and thus the time of the attack/crisis is not so straightforward to predict.