Sociolinguistics is the branch of archeology which studies the connection between society and language, between the social structures and the uses of the language wherein which the users of the language live. Sociolinguistics is a field of study which assumes that the human society is made up of several associated behaviors and patterns, some of which is the linguistic.
One of the principal uses of language is to communicate meaning, but it is also used to establish and to maintain social relationships. Watch a mother with a young child. Most of their talk is devoted to nurturing the social bond between them. Listen to two friends talking. Much of their conversation functions to express and refine their mutual compact of companionship. When you meet strangers, the way they talk informs you about their social and geographical backgrounds, and the way you talk sends subtle or blatant signals about what you think of them. It is these aspects of language use that sociolinguists study.
In the thirty years or so that it has been recognized as a branch of the scientific study of language, Sociolinguistics has grown into one of the most important of the 'hyphenated' fields of linguistics. This term distinguishes the core fields of historical and descriptive linguistics (phonology, morphology, and syntax) from the newer interdisciplinary fields like psycholinguistics, applied linguistics, neurolinguistics, and Sociolinguistics or the sociology of language. Stranded at times between sociology (one of the field's putative parents) and linguistics (the other), the practitioners of Sociolinguistics have so far avoided the rigorous bounds of a single theoretical model, or the identifying shelter of a single professional organization. They apply a plethora of methods to a multitude of subjects that all have in common one single thread: languages and their use in social contexts.
There are indeed some sociolinguists who wonder how language can be studied in any other way. They believe that the search of the formal linguists like Noam Chomsky for an autonomous linguistics, with the goal of describing the idealized competence of an idealized monolingual in an idealized mono-variety speech community, is as doomed to failure as was the earlier effort of structural linguists to account for language structure without taking meaning into account.