Teleology is the philosophical study of purpose (from the Greek teleos, perfect, complete (from telos, end, result)). One of the classic arguments for the existence of God is the teleological argument, which says that the world (and particularly living things) has clearly been constructed in a purposeful (telic) rather than a chaotic manner, and must therefore have been made by a rational being.
Many consider teleological explanations of natural phenomena to be poor science, partly because they introduce an extra entity (the intending person) into explanations, partly because they seem to make it too easy to construct an explanation for anything.
The impact of Charles Darwin's theories of evolution, which hold that species develop by natural selection, was to greatly reduce the influence of traditional teleological arguments. Such arguments were still advanced by many during the resurgence of creationist sentiment in the early 1980s.
In recent years, some scientists have advocated an "Anthropic Principle" which explains the values of certain physical constants etc. as being the ones necessary for the existence of the human beings who make the relevant observations. Critics have suggested that some forms of this argument have a fatal tinge of teleology.
An illegitimate teleology occurs when one speculates, without sufficient proof, that X causes Y.