There is really no rule : do what best fits your hand and the musical expression.
Now, in general, if you have scale passages, it's better to use all of your fingers, because one you will be able to gain greater speed, and two you will reduce the risk of uneveness and stumbling for so much thumb passing.
With time, you'll realize that in most circumstances, it's easier and safer to use all of your fingers (just like those kids that don't understand why they need to use all of their fingers when it seems so easy to pick the notes with the index finger !).