When I teach Japanese I explain it like below
1. I go to the bank. ( ginkou he iku)
2. I go to the bank. ( ginkou ni iku)
....? the same??? but wait.
example 1 is the simple form of the sentence.
and what about 2?
This sentence has some `hidden words` in the sentence.
I go to the bank (to withdraw some money).
-> ginkou ni (okane wo oroshini) iku.
I go to the bank (to meet my friends).
-> ginkou ni (tomodachi to aini) iku
I go to the bank (to deposite some money)
-> ginkou ni (okane wo azukeni) iku
Thus, When the sentence was used "ni", it is implying to have another/other purpose(s) to do in the bank. If you are mentioning to just go to the bank, and thats your purpose, you can use *he*.
But usually people dont think about those rules too much. They just use them randomly.
And there are some exceptions too, but those have already been explained by Takashi earlier. Using *ni* as *to*, and *he* as *for* in English.