all of it (modeling diagrams) is for communication purposes
Modeling has 4 important usages in the software development process:
Integrated Design tool
Communication tool
An aid to software generation
A way to reduce complexity of real-word problem (I learned this from @kevin cline's response above)
The process of modeling gets some designers to think about details not considered while coding (and vice verse). Modeling at design time allows you to consider a bigger picture than coding a method or a class in a language.
Modeling in my opinion is vital for building databases (ER Diagrams), understanding process flows (Activity Diagrams) and understanding user-system interactions (Use Case diagrams).
Do people use UML to do more sophisicated things such as code or database generation?
Yes indeed. ERDs (not a UML diagram) and Class Diagrams can be used (depending on the capabilities of your tool) to generate:
1 - Data Definition Language (DDL)
2 - Stored Procedures for CRUD and Class Diagrams in your preferred language (less useful since ORM tools do more about this)
Amongst the most valuable features of modeling tools are:
1 - Ability to keep integrity of the model. If you do a change it propagates in the model
2 - Ability to answer where-used questions (where is the 'account' used in my model?)
3 - Ability to allow concurrent users to work on the model
4 - Search within graphical representations
5 - Printing control
6 - Layering (organize your diagram elements in layers) so that you can focus on a layer-at-a-time
7 - Database code generation for several database systems
8 - Model validation (checks consistency, missing keys, cycles, etc.)
So, modeling tools, specially the good ones, do much more than Paint.