The superfluid to Mott insulator transition and the superradiant transition are textbook examples for quantum phase transition and coherent quantum optics, respectively. Recent experiments in ETH and Hamburg succeeded in loading degenerate bosonic atomic gases in optical lattices inside a cavity, which enables the first experimental study of the interplay between these two transitions. In this letter we present the theoretical phase diagram for the ETH experimental setup, and determine the phase boundaries and the orders of the phase transitions between the normal superfluid phase, the superfluid with superradiant light, the normal Mott insulator and the Mott insulator with superradiant light. We find that in contrast to the second-order superradiant transition in a weakly interacting Bose condensate, strong correlations in the superfluid nearby a Mott transition can render the superradiant transition to a first order one. Our results will stimulate further experimental studies of interactions between cavity light and strongly interacting quantum matters.