Following the Deepwater Horizon (DWH) spill in 2010, an enormous amount of oil was observed in the deep and surface waters of the northern Gulf of Mexico. Surface waters are characterized by intense sunlight and high temperature during summer. While the oil-degrading bacterial communities in the deep-sea plume have been widely investigated, the effect of natural sunlight on those in oil polluted surface waters remains unexplored to date. In this study, we incubated surface water from the DWH site with amendments of crude oil, Corexit dispersant, or both for 36 days under natural sunlight in the northern Gulf of Mexico. The bacterial community was analyzed over time for total abundance, density of alkane and polycyclic aromatic hydrocarbon degraders, and community composition via pyrosequencing. Our results showed that, for treatments with oil and/or Corexit, sunlight significantly reduced bacterial diversity and evenness and was a key driver of shifts in bacterial community structure. In samples containing oil or dispersant, sunlight greatly reduced abundance of the Cyanobacterium Synechococcus but increased the relative abundances of Alteromonas, Marinobacter, Labrenzia, Sandarakinotalea, Bartonella, and Halomonas. Dark samples with oil were represented by members of Thalassobius, Winogradskyella, Alcanivorax, Formosa, Pseudomonas, Eubacterium, Erythrobacter, Natronocella, and Coxiella. Both oil and Corexit inhibited the Candidatus Pelagibacter with or without sunlight exposure. For the first time, we demonstrated the effects of light in structuring microbial communities in water with oil and/or Corexit. Overall, our findings improve understanding of oil pollution in surface water, and provide unequivocal evidence that sunlight is a key factor in determining bacterial community composition and dynamics in oil polluted marine waters.