The relation between language and society is very important. Indeed, social structure may either influence or determine linguistic structure and behavior.
Young children speak differently from older children and, in turn, children speak differently from mature adults.
If you think more about it, you can find out that the relationship is bi-directional: language ans society may influence each other.
It depends on many factors. Two or more people communicate with each other by employing a system of communication, a code. It's really important who those people are, and what society they belong with. Their language would be different from the language of some other people who are, for example doctors.
This is a very broad topic. You have to take into consideration both regional and social dialects, accents, style, register...
Why don't you ask a specific question?