Playing deeply between the black keys can be problematic. Suppose you want to play a C major scale; only white keys. Now you don't need to play any black keys, but you need to move your fingers over them. If you want to play this at larger speeds, this becomes a major obstacle.
Another example is playing a large chord, say,
B flat - E - G - C (C dominant seventh, third inversion). You most probably cannot play this without using your thumb to play the B flat, requiring you to move all your fingers deeper into the keys.
The only possible answer is that it mostly depends on what you are playing.
As for a beginner (from the tags on your question) I would recommend keeping your fingers in front of the black keys (since not doing so greatly limits the mobility of your fingers to the sides, for obvious reasons). When you need to play a black key, you of course need to move your hand forward a little to facilitate it.
Closing advice: try to avoid playing black keys with your thumb. This is simply because the black keys are furthest away from you and your thumb is your shortest finger. Of course, this is not an absolute rule, playing black keys with thumbs sometimes is necessary, but if you have reasonable alternatives, prefer those. If you look at the standard fingerings for the chromatic scale and the major and minor scales, you'll note none uses a thumb on a black key.