Functionalist Explanation involves the study or interpretation of phenomena in terms of the functions which they fulfill, especially within an overall system. The explanations offered by functionalists or structural functionalists (Structural Functionalism) have a property referred to as teleology - explaining things in terms of their end results or purposes.
Functionalists tend to explain features of social life in terms of their function (the part they play) in social life. These kinds of functionalist explanations are found in biology as well and it is not surprising that functionalists like David Emile Durkheim adopted an organic metaphor. The lungs, for example, are explained in terms of what they do in and for the human body. We cannot say that there is always a true functionalist explanation for any given social behavior.
In biology, functionalist explanations are scientifically valid, because we understand the causal mechanism whereby function plays a causal role. That causal mechanism is evolution, of course, and we have a very good explanation for how evolution works in the form of genetics. DNA (plus a lot of other stuff) provides the precise causal mechanism by which evolution operates.
There is, however, a significant difference between functionalist explanation in biology and functionalist explanation in the social sciences.
Functionalist explanations play an important role in evolutionary biology. When we try to explain why an organism has a particular trait we appeal to the function that the trait serves.
The classic example of this reasoning is found in Durkheim's discussion of the functions of crime in any society. He argues that as darkness needs light, a moral society needs immorality as a way to make morality visible.
Many sociologists have argued that crime or deviance also help the society by clarifying the moral boundaries of the group. Many would argue that these are not explanations at all, but are logically circular.
Functional Explanation in Legal Theory - Functionalist explanations are frequently invoked in positive legal theory. Marxist explanations of law are functionalist in nature.
Marxist social theory relies heavily on functionalist explanation in general.