"When you wish upon a star" and "your dreams come true" are the first and last lines of the song accompanying the 1940 Disney film Pinocchio.
The phrases are based on the superstition that if you make a wish three times when you see a shooting star, it will come true. The Disney lyrics don't mention "three times", and since a shooting star usually lasts for a second or two, it's gone before you finish saying "Oooh! Look!" So you've no time at all to make your wish even once.
The superstition is popular worldwide, not only in Japan, though apparently Yaeyama Island in Okinawa is a pretty good place to go star gazing. And the superstition has not always about having wishes come true. The belief that shooting stars are bad omens was introduced from the Chinese 14th century classic Romance of the Three Kingdoms where fiery meteors fell over Zhuge Liang's camp three times.
Then in the 19th century Hans Christian Andersen published The Little Match Girl. She saw a shooting star, which her late grandmother had told her meant that someone had died. Consequently, shooting stars were associated with death, and today's science confirms that a shooting star is actually the "death" of a meteorite.
So it's neither clear when and where "three times" came into the superstition, nor when and where the omen of death changed to having your dreams come true.
Nevertheless, it's always a proud feeling to catch sight of a shooting star.
The religious interpretation of that brief streak of light is a result of God peeking down from heaven. That's a great chance to say (or just think) your wish, and God will hear.
A belief that God peeks down from heaven, goes against what most religions hold true about the omnipresence of God. No need for God to peek from anywhere, since God is fully aware of everything that's going on. Similarly, a shooting star is not the only "great chance" to speak directly to God; the opportunity is there 24/7.
The Christian Bible does reference stars linked with specific events, though not necessarily shooting stars. One possible exception is in Revelation 8:10-11 (KJV):
And the third angel sounded, and there fell a great star from heaven, burning as it were a lamp, and it fell upon the third part of the rivers, and upon the fountains of waters. And the name of the star is called Wormwood*: and the third part of the waters became wormwood; and many men died of the waters, because they were made bitter.
(* Wormwood is a bitter-tasting plant and frequently used in the Bible to represent bitterness.)
That doesn't align with the superstition that a shooting star means your wishes will come true.
In Japan, star superstitions come from a soup of Buddhist, Shinto, Confucian and animistic beliefs. Some shrines (Shinto) and temples (Buddhist) were built as monuments of shooting stars or comets, especially in Kansai and other parts of western Japan.
There's a monkey deity called Tengu, often characterised by a red face and an exceptionally long nose (no relation to Pinocchio, we assume) and often wearing priestly garb. Tengu made its appearance in Japan to a Buddhist priest in the 8th century as a large shooting star. This occurrence was followed by a great famine - not something anyone would wish to come true.
Seeing a shooting star means you are seeing a glowing meteoroid at an altitude somewhere between 75 km and 100 km, rapidly passing through Earth's atmosphere and sometimes shedding glowing material in its wake.
Seeing a shooting star means whatever you want it to mean.