Halliday & Hasan (1976: 21, 22):
The term SITUATION, meaning the 'context of situation' in which a text is embedded, refers to all those extra-linguistic factors which have some bearing on the text itself. A word of caution is needed about this concept. At the moment, as the text of this Introduction is being composed, it is a typical English October day in Palo Alto, California; a green hillside is visible outside the window, the sky is grey, and it is pouring with rain. This might seem part of the 'situation' of this text; but it is not, because it has no relevance to the meanings expressed, or to the words or grammatical patterns that are used to express them. The question is, what are the external factors affecting the linguistic choices that the speaker or writer makes. These are likely to be the nature of the audience, the medium, the purpose of the communication and so on. There are types of discourse in which the state of the weather would form part of the context of situation, for example, language–in–action in mountaineering or sailing; but writing a book about language is not one of them. …
The concept of CONTEXT OF SITUATION was formulated by Malinowski in 1923, in his supplement to Ogden and Richard's The Meaning of Meaning and subsequently elaborated by Firth, particularly in a paper written in 1950 called 'Personality and language in society'.