We perform high-throughput density functional theory (DFT) calculation of optoelectronic properties (electronic bandgap and frequency dependent dielectric function) using OptB88vDW (OPT) and Tran-Blaha modified Becke Johnson potential (MBJ) potential. This data is distributed publicly through JARVIS-DFT database. We used this data to evaluate the differences between these two formalisms and quantify their accuracy comparing to experimental data whenever applicable. At present, we have 17,805 OPT and 7,358 MBJ bandgaps and dielectric functions. MBJ is found to predict better bandgaps than OPT, so it can be used to improve the well-known bandgap problem of DFT in a relatively inexpensive way. The peak positions in dielectric function obtained with OPT and MBJ are in comparable agreement with experiments. The data is available at our website: http://www.ctcms.nist.gov/~knc6/JVASP.html .