This is the boldest and probably most brilliant move by any Indian politician since liberalization of economy in 1990s.
Having said that, another way of understanding this is that as of today both old 500 Rs and 1000 Rs notes have been "probabilistically devalued". For anyone in middle class and below the value essentially remains the same (other than a small devaluation due to effort required to get them exchanged), however for anyone holding large number of notes, the value has been significantly lowered by approximately ~10 to 20% consider when the money gets deposited, there would be an income tax due on it.
Modi received a lot of flak not doing anything about black money and corruption after getting elected in spite of promises before the election. Bust as this move shows, he has taken the bold step, and can go for an election in 2019 without worrying.
To make it even simpler:
Assume that people in USA used 100$ notes (hard to hoard 20$ notes) to skip paying income tax (but mostly real estate transaction tax) and dealt in cash, by declaring 100$ notes as illegal tender and forcing them to be exchanged for new 50$ and 200$ notes. The government can ensure that this money is deposited or converted in banks. Ensuring that all "fake" 100$ notes are caught / lose value and people hoarding cash to skip paying income tax are forced to put the money in circulation. Otherwise come December 31st the value of the notes is same as piece of paper they are printed on.