In the ninth book of Homer's Odyssey, Odysseus and his men find themselves in the land of the Cyclopes. When they initially arrived at te cave of a certain Cyclops named Polyphemus, the Cyclops was not there. All signs indicated that the creature was a shepherd and that he was out tending his flocks.
Odysseus is curious to test the customs of the Cyclopes and so rather than returning to his ship, he, with a small group of his men, decides to wait at Polyphemus' cave. After making this decision, Homer tells us that Odysseus and company "lit a fire and made an offering" (A.S. Kline translation).
Why they light a fire is not clear, but we may suggest a few possibilities. First, because it was probably late in the day when the Cyclops returned and because Odysseus and his men were inside a dark cave, they might have wanted some light. Also, caves tend to be cool, so Odysseus and company may have wanted some warmth. Finally, they may have used the fire to burn their offering. In Greek culture, sacrificial animals were often burned and the smoke from these offerings would waft up to heaven to the delight of the gods.