Photopharmacology describes the use of light to precisely deliver drug activity in space and time. Such approaches promise to improve drug specificity by reducing off-target effects. As a proof-of-concept, we have subjected the fourth generation photoswitchable sulfonylurea JB253 to comprehensive toxicology assessment, including mutagenicity and maximum/repeated tolerated dose studies, as well as in vivo testing in rodents. Here, we show that JB253 is well-tolerated with minimal mutagenicity and can be used to optically-control glucose homeostasis in anesthetized mice following delivery of blue light to the pancreas. These studies provide the first demonstration that photopharmacology may one day be applicable to the light-guided treatment of type 2 diabetes and other metabolic disease states in vivo in humans.