The band structure, density of states, optical properties, carrier mobility, and loss function of graphene, black phosphorus (BP), and molybdenum disulfide (MoS2) were investigated by the first-principles method with the generalized-gradient approximation. The graphene was a zero-band-gap semiconductor. The band gaps of BP and MoS2 were strongly dependent on the number of layers. The relationships between layers and band gap were built to predict the band gap of few-layer BP and MoS2. The absorption showed an explicit anisotropy for light polarized in (1 0 0) and (0 0 1) directions of graphene, BP, and MoS2. This behavior may be readily detected in spectroscopic measurements and exploited for optoelectronic applications. Moreover, graphene (5.27 × 104 cm2·V-1·s-1), BP (1.5 × 104cm2·V-1·s-1), and MoS2 (2.57×102 cm2·V-1·s-1) have high carrier mobility. These results show that graphene, BP, and MoS2 are promising candidates for future electronic applications.