I'm a high school student who never studied any relativity before, but I'm just wondering what was THE question that Einstein asked himself before going into this field. I knew he has done lots of work such as Brownian motion, photoelectric effect,etc. What was the question that baffled and therefore motivated him to work on relativity?
The photoelectric effect issue was motivated by the evidence that increasing the amount of radiation of a given wavelength doesn't make an electron jump out from the atom. Only increasing the frequency of the radiation above a given threshold ionized the atom. So, Einstein decided that e.m. radiations is corpuscular, quantized, and each quantum carries an amount hf of energy, and the atom when is ionized absorbs a quantum. The idea of corpuscularity of the e.m. radiation was previously emitted Max Planck who found the relation E = hf. Thus, shedding on an atom more and more photons of an insufficient quantum of energy, is more of the same, and doesn't ionize the atom. See also the previous history of the e.m. quantization, the so-called "ultraviolet catastrophe", in Wikipedia, that shows how Planck came to propose his relation.
About the relativity, Einstein was attracted by the idea, why should the light have different velocities with respect to different frames of coordinates in movement.