Yes, she is originally from the moon (月), in both the original fairytale 『竹取物語』 (Taketori Monogatari, meaning The Tale of the Bamboo Cutter) from the 10th century (a classic of Japanese literature) and in the Studio Ghibli film. She feels sad when she looks at the moon because she doesn't want to go back there.
Wikipedia's plot description of the anime film says,
A bamboo cutter named Sanuki no Miyatsuko discovers a miniature girl inside a glowing bamboo shoot. Believing her to be a divine presence, Miyatsuko and his wife decide to raise her as their own, calling her "Princess". . . . When the girl comes of age, she is granted the formal name of "Princess Kaguya" for the light and life that radiates from her.
Spoiler:
Kaguya then demonstrates the ability to disappear at will. . . . Kaguya reveals to her parents that she originally came from the Moon. Once a resident of the Moon, she broke its laws, hoping to be exiled to Earth, so that she could experience mortal life. When the Emperor made his advances, she silently begged the Moon to help her. Having heard her prayer, the Moon will reclaim her during the next full moon. Kaguya confesses her attachment to Earth and her reluctance to leave. . . . When the Moon shines upon Kaguya, she begs Sutemaru to hold her tightly. Despite Sutemaru's best efforts, Kaguya is torn from his grasp out of the sky. . . . On the night of the full moon, a procession of celestial beings descends from the Moon, and Miyatsuko is unable to stop it. An attendant offers Kaguya a robe that will erase her memories of Earth. . . . The attendant then drapes the robe around Kaguya, and she appears to forget about her life on Earth. The procession ascends to the Moon, leaving Miyatsuko and his wife distraught, as Kaguya looks back one last time with tears in her eyes.
The 10th century characters associate (or, we might say, conflate) the moon, which is impossibly far away, with heaven (天, ten), and therefore they think of people of the moon as living in heaven (similar to the humans in Marvel's Avengers universe assuming Thor and his friends are gods because they have superpowers and are from another place... though from Thor's own perspective, he is not actually a deity).
Spoiler:
This is why, in the original version, the Emperor asks where the tallest mountain is so that he can be as close to heaven (where Kaguya-hime will be when she is on the moon) as humanly possible: Mt. Fuji, which is the tallest peak in Japan.
In the original fairytale, the Buddha was not named among the celestial beings, but they were clearly described both as being from the capital (city) of the Moon (月の都/京 Tsuki-no-Miyako) and also as being from heaven. It is Studio Ghibli's creative license to portray one of the heavenly beings as either being, or looking like, the Buddha. Buddhism has been practiced in Japan since at least 552 AD, as dated in Nihon Shoki, the second oldest book of classical Japanese history. Buddhism began to spread throughout Japan during the Heian period, so the original author of the fairytale might have been aware of the religion, but it is unknown how the author viewed it.