Genesis 1:1 says, "In the beginning God created the Heaven and the Earth." There is no mention or suggestion that God created (or prepared) hell when He created the heaven and the earth. The reason was because there was no need for hell. There was no devil in the beginning. There was no sin in the beginning, and God does not create or prepare anything that is of no use to Him or His creatures.

So, when was Hell prepared, and why? Hell was prepared after Lucifer became the devil. The date or time this happened is not revealed to us. The Word of God tells us why and how Lucifer became the devil; but it does not tell us when this happened.