God is light and in Him is no darkness at all.
What existed before the universe was created by God. Simple. God--Father, Son and Holy Spirit existed. In perfect harmony with one another. Perfect in every divine aspect. Perfect in love and actions. The One divine and eternally existing God. Time, Space and Matter were non-existent. There was nothing but the One divine being living in perfect harmony and unity as Father, Son and Holy Spirit. Perfect in their thoughts, actions and love. Why did God create? Simple. Because God could. God's thoughts for creating are infinite. It gives God pleasure to create. And God enjoys His creation praising, enjoying and appreciating God for who He is and for what He has done.
Before creation there was absolutely nothing. No particles of any kind. No matter , no material universe as we know was ready to bust forth and create itself. Nothing existed so nothing was able to bring forth something. For nothing is simply not anything. And nothing has no prospect of having anything of value. For nothing from nothing leaves nothing. And nothing can do anything because nothing does not exist. The Universe, the stars, the quasars, the galaxies, solar systems, stars, planets moons. Nothing in this our material universe existed. For nothing isn't anything that desires to be something. It's nothing.
So then logically nothing could create anything. For there was nothing. There wasn't even the blackness of darkness for then that would be something. A very dark something. The only One who existed was the Father, Son and Holy Spirit. So then why did God choose to create anything? For His own glory as stated in Col. 1:16 and Rev. 4:11. God wanted to manifest His attributes. Creation itself is an expression of God's glory, love, grace, mercy, wisdom, power, and goodness. Eph. 3:9-10 tells us God created the universe to make known His power and wisdom. And Hebrews 2:10 said His purpose in creation was to bring many sons and daughters to glory. 1 Peter 2:9 tells His elect," you are a chosen generation, a royal priesthood, a holy nation, His own special people, that you may proclaim the praises of Him who called you out of darkness into His marvelous light; God created us to be His people. And 1 Thess 4:17 while speaking of the resurrection says that we will be with the Lord Jesus for eternity.
As reformed Christians say the chief end of man is to glorify God and enjoy Him forever. But why did God create anything? We can learn much about God from the Bible but His thoughts are not our thoughts and His ways are not our ways. He is beyond anything we can comprehend. Our understanding of His ways is very limited. And that includes the why of creation. But we know God did create. His creation was an intentional act. He had a purpose in creating, and the accomplishment of His purpose in creation is ongoing even now, concluding at some time in the future.
He did not create us because he was lonely or needed someone to love. The three persons of the Trinity ensure that God is never lonely. Nor does he need an outlet for his love. Throughout eternity there has been a loving communion between the Father, the Son, and the Holy Spirit. Isaiah 43:7 tells us God says, "Everyone who is called by My name, Whom I have created for My glory; I have formed him, yes, I have made him.” God created us for His glory. God created us for himself. God did not create because of any lack that he had. God has no needs that we, or this creation can meet. (Ps. 50:9-13) In the psalm, God expressed that all of creation is his, and he needs nothing that we can provide. We are in need of Him.
Back to creation-- the Bible says "In the beginning God created the heavens and the earth." The New Testament tells us that through the Word who was in the beginning with God and was God all things were created that are in heaven and on earth. That is the Son of God, Jesus Christ, The second person of the triune God , Himself God, was the One through whom all things came into existence. Paul explains in Col. 1:16 For by Him all things were created that are in heaven and that are on earth, visible and invisible, whether thrones or dominions or principalities or powers. All things were created through Him and for Him. And He is before all things, and in Him all things consist. All things hold together by Christ Jesus the Word. The Word became flesh and dwelt among us. And we beheld His glory as the only begotten of the Father full of grace and truth. (John 1:14)
Jesus answered and said to them, “You are mistaken, not knowing the Scriptures nor the power of God. (The power of God, which, as it was able to make men out of the dust of the earth, was able to raise them again, when crumbled into dust; but this was looked upon by them, as a thing impossible, and so incredible; John Gill)
"Why should it be thought incredible by you that God raises the dead?" ( Acts 26:8 ).
“Most assuredly, I say to you, he who hears My word and believes in Him who sent Me has everlasting life, and shall not come into judgment, but has passed from death into life. Most assuredly, I say to you, the hour is coming, and now is, when the dead will hear the voice of the Son of God; and those who hear will live. Do not marvel at this; for the hour is coming in which all who are in the graves will hear His voice and come forth—those who have done good, to the resurrection of life, and those who have done evil, to the resurrection of condemnation. (John 5:24-25;28-29 Words of Messiah Jesus)
He who has the Son has life; he who does not have the Son of God does not have life. These things I have written to you who believe in the name of the Son of God, that you may know that you have eternal life, and that you may continue to believe in the name of the Son of God. (1 John 5:12-13)
He who believes in the Son has everlasting life; and he who does not believe the Son shall not see life, but the wrath of God abides on him.” " Nor is there salvation in any other, for there is no other name under heaven given among men by which we must be saved.” (John 3:36;Acts 4:12)
XX The Long View (2013): The true—and vast—complexity of the universe was captured in this vista recorded by a pair of automated telescopes, one in the U.S. and one in the Chilean desert. From our little perch inside the Milky Way, the image shows the universe stretching out for about a billion light years, which is only a small fraction of its total size. Each of the 50,000 dots represents an entire galaxy.