Am I allowed to write an essay about a scientific theory without violating the copyright? I have in project to write an essay on the Special Theory of Relativity. My idea is then to publish it as an ebook.

I would like to know if I can freely write about this topic or I need to take into account some problems related to royalties or copyright. Can I write about a topic like that without any problems of this kind? Can I include quotes and information about Einstein's life?

Thanks in advance!
Yes.

Scientific principles are never subject to copyright—you cannot copyright a scientific idea, theory, equation, or concept. 

That said, you do have to worry about copyright if you extensively quote from copyrighted primary or secondary resources as part of your text. If you are not directly using their language, then you need only cite the works, and no royalty or copyright issues should arise.

(Note that in the particular case of the special theory of relativity, it is more than 95 years old (as it was announced in 1905), and thus is no longer under US copyright protection in any event, so you could in principle reuse or even reprint the entire text of his article.)