Theory of light