Optics of atomically thin films and van der Waals heterostructures made from two-dimensional semiconductors