Both is ok, what matters is the way it's implemented in the game. Having tough and frequent random fights without being able to save anywhere and with limited supply of healing items wouldn't be a good idea, for example.
DSC on Nightmare would be unplayable without visible encounters, on the other hand I liked MM4 better with invisible.
Generally, I would say that invisible encounters work best when combined with huge dungeons, good ways of sustaining mana for a very long time and saves at special places only. LP3 and Asguaard are the best examples. Especially the way Nymph's para worked in LP3 (HPs first, then MPs - i.e. weaker enemies were killed before Sarah got the MPs from them) made it very interesting. Battles in LP3 made me to fall in some kind of "trance" (move, kill quickly, move, move, kill quickly, move, kill for MPs,...), i.e. to a state where I went through the battles semi-automatically. A pretty memorable experience a I've always felt that this is the way a hero fighting through hordes of enemies should feel.
A big problem of this approach is that it's obviously very hard to do correctly, actually, except from a few Aldorlea games, I've never ever experienced this feeling. Another drawback is that it relies heavilly on RNG (Random number generator) and in fact, RNG in RPG Maker (at least in RM2K, I'm not so sure about XP) is not so random. An example of what I'm talking about - run Solitaire in Windows and just hold F2 for New Game - you will notice that although the cards actually only change every new second, not every new game (there are quite a few new games in one second when you hold F2). Why I'm giving this not RPG Maker related example? Because I wanted to demonstrate one thing that I'm pretty sure about - RNG used in RPG Maker depends on time and the frequency of random fights depends on RNG, so the older games without "minimum steps between battles" feature (which is imo a pretty clever idea) were literally unplayable without fighting each step during some hours (if I remember it right especially playing around midnight was painfull sometimes).
As for the visible encounters, they are probably less problematic for many players, it's important to have some "farming" areas though, i.e. some quickly accessible respawning monsters with good enough "toughness/reward" ratio.
Also, I agree with Cassiopeia that there can be both visible and invisible in one game, for example dungeons - visible and world map - invisible works pretty well.
Imo, ideal way how to handle this is in MM, i.e. selection of visible/invisible + prequency for invisible. But if I should choose one I still prefer invisible slightly.