VLANs are used for multiple reasons. The first of which would be to minimize the broadcast domain. Certain network devices will send out large amounts of broadcast traffic and VLANs can be used to segment a network limiting the amount of broadcast on the network. When a network reaches a certain size, usually 600 devices or more, this traffic can really slow down the network.
Second VLANs can be used as a security device to prevent specific hosts from seeing other hosts. You are essentially creating separate LANs that rules can be applied to with ACLs to secure them.