Owing to their atomic layer thickness, strong light-material interaction, high nonlinearity, broadband optical response, fast relaxation, controllable optoelectronic properties, and high compatibility with other photonic structures, 2D materials, including graphene, transition metal dichalcogenides and black phosphorus, have been attracting increasing attention for photonic applications. By tuning the carrier density via electrical or optical means that modifies their physical properties (e.g., Fermi level or nonlinear absorption), optical response of the 2D materials can be instantly changed, making them versatile nanostructures for optical modulation. Here, up-to-date 2D material-based optical modulation in three categories is reviewed: free-space, fiber-based, and on-chip configurations. By analysing cons and pros of different modulation approaches from material and mechanism aspects, the challenges faced by using these materials for device applications are presented. In addition, thermal effects (e.g., laser induced damage) in 2D materials, which are critical to practical applications, are also discussed. Finally, the outlook for future opportunities of these 2D materials for optical modulation is given.