In an area of darkness, the PCs are in 30 ft. of normal light due to lanterns. 100 feet above them, a creature with 100 ft. reach strikes. It can see them fine, despite the intervening darkness because of their lanterns, correct?
In response, the PCs cast dancing lights with a range of 100 ft. and send it up to the creature. This illuminates 20 ft. around the creature, and allows them to attack it without a miss chance despite the intervening dim light, correct?