Job 31:26

if I looked to the light when it shone, or the moon walking in brightness,

Ezekiel 8:16

And He brought me into the inner court of Jehovah's house, and behold, at the opening of the temple of Jehovah, between the porch and the altar, were about twenty-five men with their backs toward the temple of Jehovah and their faces toward the east; and they bowed themselves eastward to the sun.

Deuteronomy 4:19

and lest you lift up your eyes to the heavens, and when you see the sun, and the moon, and the stars, all the host of heaven, lest you should be driven to worship them and serve them, which Jehovah your God has allotted to all nations under all the heavens.

Deuteronomy 17:3

and has gone and served other gods and worshiped them, either the sun, or moon, or any of the host of heaven, which I have not commanded,

2 Kings 23:5

And he put down the idol-worshiping priests, whom the kings of Judah had ordained to burn incense in the high places in the cities of Judah, and in the places around Jerusalem. He also put down those who burned incense to Baal, to the sun, and to the moon, and to the planets, and to all the host of the heavens.

2 Kings 23:11

And he took away the horses which the kings of Judah had given to the sun, at the entering in of the house of Jehovah, by the room of Nathan-melech the eunuch, which was in the suburbs. And he burned the chariots of the sun with fire.

Jeremiah 44:17

But we will certainly do whatever thing goes forth out of our own mouth, to burn incense to the queen of heaven, and to pour out drink offerings to her, as we have done, we, and our fathers, our kings, and our rulers, in the cities of Judah, and in the streets of Jerusalem. For then we had plenty of food, and were well, and saw no evil.

Genesis 1:16-18

And God made two great lights: the greater light to rule the day and the smaller light to rule the night, and the stars also.

Deuteronomy 11:16

Take heed to yourselves that your heart may not be deceived, and you turn aside and serve other gods, and worship them,

Psalm 8:3-4

When I look at Your heavens, the work of Your fingers, the moon and the stars which You have established;

Jeremiah 8:2

And they shall spread them before the sun, and the moon, and all the host of the heavens, whom they have loved and whom they have served, and after whom they have walked, and whom they have sought, and whom they have worshiped. They shall not be gathered nor buried; they shall be as dung on the face of the earth.

Treasury of Scripture Knowledge

Summary

If I beheld the sun when it shined, or the moon walking in brightness;

General references

Bible References

Beheld

Genesis 1:16
And God made two great lights: the greater light to rule the day and the smaller light to rule the night, and the stars also.
Deuteronomy 4:19
and lest you lift up your eyes to the heavens, and when you see the sun, and the moon, and the stars, all the host of heaven, lest you should be driven to worship them and serve them, which Jehovah your God has allotted to all nations under all the heavens.
Deuteronomy 11:16
Take heed to yourselves that your heart may not be deceived, and you turn aside and serve other gods, and worship them,
Deuteronomy 17:3
and has gone and served other gods and worshiped them, either the sun, or moon, or any of the host of heaven, which I have not commanded,
2 Kings 23:5
And he put down the idol-worshiping priests, whom the kings of Judah had ordained to burn incense in the high places in the cities of Judah, and in the places around Jerusalem. He also put down those who burned incense to Baal, to the sun, and to the moon, and to the planets, and to all the host of the heavens.
Jeremiah 8:2
And they shall spread them before the sun, and the moon, and all the host of the heavens, whom they have loved and whom they have served, and after whom they have walked, and whom they have sought, and whom they have worshiped. They shall not be gathered nor buried; they shall be as dung on the face of the earth.
Ezekiel 8:16
And He brought me into the inner court of Jehovah's house, and behold, at the opening of the temple of Jehovah, between the porch and the altar, were about twenty-five men with their backs toward the temple of Jehovah and their faces toward the east; and they bowed themselves eastward to the sun.

The moon

Psalm 8:3
When I look at Your heavens, the work of Your fingers, the moon and the stars which You have established;
Jeremiah 44:17
But we will certainly do whatever thing goes forth out of our own mouth, to burn incense to the queen of heaven, and to pour out drink offerings to her, as we have done, we, and our fathers, our kings, and our rulers, in the cities of Judah, and in the streets of Jerusalem. For then we had plenty of food, and were well, and saw no evil.

General references

Psalm 104:19
He appointed the moon for seasons; the sun knows its going down.
1 Corinthians 15:41
one glory of the sun, and another glory of the moon, and another glory of the stars; for one star differs from another star in glory.