One day Ryōkan returned to his hermitage only to find a burglar there. After an exchange which I’ll detail below, he wrote this haiku.
盗人に取り残されし窓の月
nusubito ni torinokosareshi mado no tsuki
the thief
left it
the moon at my window
—Ryōkan

This is one of my favorite haiku. Ryōkan captures such an image that one can’t help but love it. So beloved, in fact, that this story has been the basis for a famous “Zen tale”.
The tale goes as follows:
Ryōkan, a Zen master, lived the simplest kind of life in a little hut at the foot of a mountain. One evening a thief visited the hut only to discover there was nothing in it to steal.
Ryōkan returned and caught him. “You may have come a long way to visit me,” he told the prowler, “and you should not return empty-handed. Please take my clothes as a gift.”
The thief was bewildered. He took the clothes and skunk away.
Ryōkan sat naked, watching the moon. “Poor fellow,” he mused. “I wish I could give him this beautiful moon.”
Some versions of the story feature a cushion instead of clothes, and others have him sleeping while the thief searches for things to steal and waking up to have the conversation, but minor differences aside it is the same story.
If you’ve ever been somewhere without light pollution where you could see the moon in all it’s glory, you may know Ryōkan’s feeling. How can we not be grateful with such beauty just above us? Being grateful for the simple things, such as the beautiful moon, is a common theme not only in haiku but also in Zen Buddhism.
We can read the haiku literally, that the thief didn’t stop to enjoy the wonder of nature, the beautiful sight of the moon. Or we can read it metaphorically, that in his haste to find and steal treasure, the thief failed to recognize that he was in the presence of an enlightened person and had a chance to learn about the secrets of life. The moon is often used as a metaphor for enlightenment. It works well on both levels, so however you choose to read it, it is a great one.
Ryōkan was an interesting guy and we can see how the story may well be true. He became a Zen priest very early in life. After achieving enlightenment, he left the temple and became a hermit for most of the rest of his life. He was a compassionate guy to the extreme and loved helping others even though he had nothing of his own. We could use more like him in this world.