Physics students are taught about the experiment with light rays moving on perpendicular paths carried out by Michelson and Morley in 1887. They rotated their apparatus through various angles and later Morley and Miller performed the experiment at different times of the year but the same near null result in the shift in their interference pattern was obtained. The null result implied that there was no detectable movement of the Earth relative to the ether and so removed the notion of the ether as an absolute reference frame.
As this experiment was performed before Albert Einstein proposed his special theory of relativity in 1905 a common misconception is that Einstein referred to the Michelson-Morley experiment when he published his special theory of relativity in 1905. Einstein may have been aware of the experiment and its results may have confirmed his own beliefs, but there is no direct mention of the Michelson-Morley experiment in his great paper on relativity entitled "On the Electrodynamics of Moving Bodies" (Annalen der Physik, 17, 1905, 891-921).
Einstein stated in the introduction of his paper that "light is always propagated in empty space with a definite velocity c which is independent of the state of motion of the emitting body". Einstein further stated that "the introduction of a luminiferous ether will prove to be superfluous inasmuch as the view here to be developed will not require an absolutely stationary space provided with special properties". It was due to the genius of Einstein that he was able to put these ideas together to form a theory that changed our understanding of space and time.
What then is the long term role of the Michelson-Morley experiment in science? This experiment started a series of new ideas to explain its null result. These included FitzGerald’s hypothesis that the dimensions of the interferometer were contracted in the direction that the Earth was moving and Lorentz’s formulation of equations, now known as the Lorentz transformation, which allowed Maxwell’s equations of electromagnetism to have the same form in moving reference frames. These developments were brought together in Albert Einstein’s special theory of relativity in 1905 in which our understanding of space and time was radically changed.
In summary, Einstein’s two postulates on which his special theory of relativity is based are (Einstein 1905 The Standard of Greatness by John S Rigden, Harvard University Press, 2005, p87):
The Principle of Relativity: The laws of physics are the same in all inertial reference systems or, by means of physical experiments, one inertial coordinate system cannot be distinguished from another inertial coordinate system.
The Principle of the Constancy of the Speed of Light: The speed of light is the same in all inertial reference systems, independent of the speeds of either the source of the light or the detector of the light.