One of the things "creationists" say that most annoys me is "Evolution is only a theory". The only thing that this saying illustrates is that the speaker doesn't actually know what a theory is, and probably confuses it with a hypothesis. People who don't understand science shouldn't talk about it! And, by the way, people like Richard Dawkins who don't understand religion shouldn't talk about it either, but that is another subject.
In fact theories are the glory of science. I would go further and say that theories are what science largely consists of. To say that something in science is "only a theory" is a bit like saying that Tristan und Isolde is only an opera. Hypotheses are also essential to the progress of science but they are a very different kind of animal.
A hypothesis is a "what if" idea, usually conceived as a way of explaining an anomalous experimental result. You postulate a force or a particle or an effect that, if it existed, would explain away the anomaly. Then you try to predict other possible consequences of the existence of this hypothetical entity. Finally you design and carry out experiments to look for those consequences. If you find them, your hypothesis is confirmed; if not, it is disproved. If a hypothesis is repeatedly confirmed, it becomes accepted as fact.
A hypothesis is thus by its nature a short-lived thing. Either it is quickly disproved or it gradually becomes an accepted fact and ceases to be regarded as a hypothesis. Theories however are long-lasting, and many theories have become permanent features of the scientific worldview. They will last until they are subsumed into a more general theory. Unlike a hypothesis, a theory never turns into a fact. Facts are the result of observation, whereas theories are there to explain why the facts are as they are.
Scientific theories basically use knowledge gained from one area of science to explain the behaviour of things in another area. Theories thus integrate wider and wider areas of science, with later theories being more comprehensive (and therefore more elegant) than earlier ones. A good example is the replacement of the theory of the conservation of energy by the more modern theory of the conservation of mass plus energy.
The great theoretical scientists are simply those who have done most to unify different scientific disciplines. Thus Michael Faraday unified magnetism, electricity and chemistry. James Clerk Maxwell unified electromagnetism with light theory, showing that light and radiant heat were examples of electromagnetic waves. Isaac Newton unified mechanics and astronomy with his theory of gravitation. Julian Huxley unified Darwinian evolution with Mendelian genetics. Steven Hawking unified the theory of black holes (an offshoot of relativity) with quantum theory. Incidentally, while Huxley was an agnostic and Hawking identifies himself as an atheist, the other three were all devout Christians. Faraday would be regarded today as a fundamentalist.
So where does evolution fit in? Confusingly, there have been in the past both a hypothesis and two competing theories going by this name. The hypothesis that living things might have evolved from earlier forms was first suggested in modern times by Erasmus Darwin (Charles Darwin's grandfather). At that time, there was no known evidence for such a process, but lack of evidence has never ruined a good hypothesis! What is perhaps unusual is that theories were then developed — one by Jean-Baptiste Lamarck and another by Charles Darwin and Alfred Wallace — which simply assumed the truth of the unproven hypothesis.
It is perilous to speculate about the motives of scientists, but Charles Darwin was certainly in urgent need of a theory of some kind to explain his remarkable observations of the finches of the Galapagos Islands. He had found that each island had its unique collection of finch species, and each species had its own diet and lifestyle and a bill shape to match. How had such a thing come about?
What Darwin did was to take his grandfather's suggestive (but as yet unproven) hypothesis that current life forms had evolved from more primitive ancestors, and combine it with explanatory material from two different branches of existing knowledge: the experience of selective breeding of animals by farmers and pigeon fanciers, and Robert Malthus's gloomy predictions of the inevitable outgrowing of resources by population. Malthus was an economist, not a natural philosopher, but Darwin saw that his theories could be relevant to biology as well as economics.
If there is competition among animals for resources, this will place a premium on successful adaptations. The first step is often to become a specialist, thus reducing the number of your competitors. If you then happen to have bodily equipment which is slightly more suitable for your special niche than that of others who share the niche with you, you will live longer than they do and have more offspring. And since offspring tend to resemble their parents (a fact well known to animal breeders), yours will probably have the same successful adaptations. The repetition of this process over many generations could in principle cause the kind of evolution that Erasmus Darwin had suggested, and would also provide a convincing explanation of the variations that his grandson had seen in the Galapagos.
The alternative theory of Lamarck explained evolution in terms of the inheritance of acquired characteristics. Giraffes constantly stretched their necks to reach higher branches and eventually produced offspring who had longer necks to start with. Darwin (unlike his successors) was prepared to accept that this kind of thing might happen sometimes, but he did not think that it could explain his finches. Still less could it provide a convincing reason for believing that evolution had happened at all. What Darwin did was to make the hypothesis of evolution more convincing by providing an explanatory theory that made some kind of evolution seem inevitable. In fact he made the idea scientifically respectable and this encouraged scientists to go out looking for evidence of it.
As a result we now have plenty of independent evidence that evolution happened: evidence from paleontology, from embryology (the embryos of our own species go through a stage of having gill slits like fish and tails like most non-human vertebrates), and above all from genetics. In recent years, genome analysis has made it possible to reconstruct the family trees that Darwin could only speculate about. His vision of a single "tree of life" has turned out to be mistaken; there are in fact four separate trees for animals, plants, fungi and seaweeds, all arising from a thicket of single-celled creatures whose precise relationships are still imperfectly known. But evolution is definitely no longer a hypothesis. It has become a proven fact. And Darwin's theory to explain how it takes place is now permanently embedded in biology, an intrinsic part of a larger explanation which is still the best one we have of how and why that fact came to be.