Read some examples of riddle poems before you embark on your own. Start with books of riddles for children. Good examples include George Szirtes's "The Red-All-Over Riddle Book."
Begin with a one-line riddle before moving on to more elaborate poems. One-liners were popular with the Anglo Saxons. A good example comes from the "Red Book of Exeter," one of few surviving collections of Anglo-Saxon poetry: "A wonder on the wave/water became bone." The answer is ice on a lake or seashore. At this stage you should not worry too much about rhyme, rhythm or meter but concentrate instead on creating a vivid image and compelling mystery.
Learn a little about some of the techniques that will help you write a riddle poem. A basic grasp of alliteration (repetition of initial consonants such as milk, murder, map), rhythm and end rhyme will help you construct a poem that is pleasing to read and hear. Some knowledge of metaphor and simile will also help: in a riddle poem you are writing about one thing to suggest another. For example, "the black cloak on the road" is asphalt. The website Poetry Online contains basic information on poetry forms and terminology.
Write your poem by starting with the answer, advises writer and consultant Eric S Raymond. Do not make it too complicated: riddle poems can be very successful if they are about ordinary objects. One method is to imagine the object talking to you and telling you what it does. Sometimes comparing the object to an animal or exotic creature can work well. Aim for short words of one or two syllables to bring pace to the poem. You can use rhyme or alliteration. Use the first person as seen in the examples of published poet Jane Holland. Choose something in the room you are in as the answer and work towards that. For example:
Three hands, round face
I count all day long
My voice keeps beat
Like the drums in a song
What am I?