The electronic band structures of two-dimensional materials are significantly different from those of their bulk counterparts, due to quantum confinement and strong modifications of electronic screening. An accurate determination of electronic states is a prerequisite to design electronic or optoelectronic applications of two-dimensional materials, however, most of the theoretical methods we have available to compute band gaps are either inaccurate, computationally expensive, or only applicable to bulk systems. Here we show that reliable band structures of nanostructured systems can now be efficiently calculated using density-functional theory with the local modified Becke-Johnson exchange-correlation functional that we recently proposed. After re-optimizing the parameters of this functional specifically for two-dimensional materials, we show, for a test set of almost 300 systems, that the obtained band gaps are of comparable quality as those obtained using the best hybrid functionals, but at a very reduced computational cost. These results open the way for accurate high-throughput studies of band-structures of two-dimensional materials and for the study of van der Waals heterostructures with large unit cells.