Nanophotonics for light trapping