Not to confuse multi-layer with multi-tier. Of course architectures multi-tier probably only work if the application is multi-layer.
The more layers "the better"?
I’ll start with the simplest. The fewer layers, the better. It is obvious that adding layers makes the software more complex. Of course this does not mean that only one layer is ideal. You have to analyze the specific problem and which will bring more advantages.
Certain complexities exist to solve certain problems, to meet certain requirements. If not for this a layer is better because it is simpler. Today almost everything has more layers because there are requirements that require this but no one should make the software more complex just because it was written in a book that should do this.
There are cases where one layer is too good. There is no reason to add layers in simple systems with few changes developed by a programmer where you know the exact environment where it will work. Trying to add layers in this case is going against the YAGNI and add unnecessary development cost.
Adding another layer is useful because it allows you to separate business rules from the user interface. At least this is what happens in most cases. This is a huge gain in terms of organization but it will make you have to deal with the same entity in two different locations. It has techniques to minimize some duplicities but complicates development.
Then you need to analyze if the gain pays. Only experience gives subsidies for this. And even then the chances of an evaluation being wrong is great. Nor is it easy to measure. This is why it is common for people to opt for a definite pattern and go with it in any situation. It seems that it is better to make a mistake because you did what everyone else does than to do what is possibly best for the specific case. But I do not agree with this.
3 layers
The most common is to have 3 layers (It is scary that this only exists in Portuguese). To tell the truth I don’t know anything useful with more than this. In 3 layers business rules are best organized by separating the data model from the way they should be handled by the application when interacting with other parties, especially with the user interface.
The use of 3 layers is triggered the most used by decoupling all the necessary parts and give more flexibility in how to assemble the application, without exaggeration. You have the layer of presentation, of applying and of business. There are cases that the latter delegates persistence and other operations to a fourth layer. It may be exaggeration. Although used a framework that abstraction all work can be advantageous. But then it seems that you only have 3 layers again.
What are the advantages of doing this? And the disadvantages?
The biggest advantage is being able to change certain components, make parts of the independent application. Being able to make changes in one part without affecting the others.
It is also useful for multiple developers (not necessarily programmers) can work in the same application each taking care of the part where he is an expert.
Gets more easy to test.
Downside
If the development is done by a person or the developers have their tasks defined by other criteria and the application does not need today and will not need tomorrow a change of its components, using layers is mental masturbation. IS increased complexity for nothing.
When to use
One of the best known Erps in the market, which I worked on, achieved its success with just one layer. Of course, at some point he had to add layers, but he can do this almost transparently for the application, in most cases. And of course we learned that marketing is more important than engineering :)
Not use
In internal systems where the team is very small, the database is known, if you know where it will run, what the exact needs of those users, layers tend to be overzealous. Don’t create complexity where you don’t need it.
Web
Today has a factor that must be considered. The Web! Systems need to work on a technology that is multi-tier and so it needs to be multi-layer. And in cases where the solution also runs in desktop there is one more reason for flexibility. That is, the market now has a requirement that has made the multi-layer almost an obligation.
Scalability
Architectures multi-tier usually allow more scalability. And this happened to be a new requirement in some cases, but not in the majority. And as said before, multi-tier demands multi-layer.
User interface
The most common architecture standards for user interface (seems to be the focus of the question) in 3 layers are: MVC, MVP, MVVM. They have probably become known to be tied to the successful technologies. See more in What is MVP and MVVM?.
MVC nay is a kind of architecture, is a Pattern design that idepende of the layers in its architecture.
– Caffé