when did psychology become a science
In discussing the history of any science, there is always the issue of where to begin. With psychology one could begin with Wundt's laboratory in 1879 in Leipzig, Germany, but that would overlook many years of important, antecedent influences in the understanding of behavior.
For a condensed overview, see the Timeline of Psychology article. The history of psychology as a scholarly study of the mind and behavior dates back to the Ancient Greeks. There is also evidence of psychological thought in ancient Egypt. Psychology was a branch of philosophy until the 1870s, when it developed as an independent scientific discipline in Germany and the United States.