Optoelectronic properties of two-dimensional materials