The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system.
It depends on the project. If it is bigger and complex or there is a need for multiple personals going to work on it, you need to have the UML diagram. It'll make easy to anyone who is interested in the project to understand the structure. Finally, If you are gonna maintain it for a period of time, provide app supports, you must need this diagram.
It also helps in analyzing the classes and objects involved in the system.It is the best way to define relation between different classes and elements of the system. It provide us correct approach when the requirements change for the system. If we have UML ,we can apply OOPS principles to make the application flexible , robust and less maintainable and able to design an effective system
By the way, it is the easiest method to explain your project to your client.