Odysseus wants to visit the Cyclops out of pure curiosity. He knows that he has the protection of the gods and he believes himself to be more than human so he does not fear entering Polyphemus' cave with twelve of his men in tow. Upon their arrival to the cave they learned that Polyphemus was gone and so the men suggested that Odysseus take some cheese and livestock and leave quickly, but Odysseus, being the conceited man that he was, wished to stay and wait for Polyphemus to return, thinking that the one eyed monster would grace his famed guest with a gift. Odysseus lost six men because of his ego and barely made his escape. He also sealed the fate of the rest of his men when he told Polyphemus who he was.
Odysseus doesn't necessarily want to visit the land of the cyclops or Polyphemus (the specific cyclops in whose cave he ended up trapped). However, he does stop to explore because he sees a fertile and quiet island. Travelling on a ship requires a lot of food and water in order to keep the crew alive and healthy, and since Odyessus' twelve ships are full of his friends and fellow soldiers, he certainly won't want to keep them on starvation provisions that slaves were often subjected to at the time. But if Odyesseus wants to keep the men fed and have fresh water available, he has to stop, find streams to refill water reservoirs and find fresh meat and grains.
It was this urge to raid the islands for food that led Odysseus and his men to raid the island of the Ciconian, the first place the stopped after leaving Troy. So, clearly Odyessus didn't mean to visit the cyclops. He wanted to grab some food, grab some water, and leave. However, the fact that he got caught by a one-eyed giant was one of those pieces of bad luck Odysseus seemed to run into a lot.