Did God create Hell when he casts Lucifer (the devil) there or did he create it before he casts Lucifer there?
Nowhere in the Bible is Lucifer used as a name for the Devil. It is a name applied to the king of Babylon. (See my answers at What Does the Bible Say About..Lucifer Being Satan Incarnate? and What Does the Bible Say About..Lucifer?).
Neither does the Bible say when Hell was created. It is created for the devil and his angels (Matthew 25:41). Whether or not it was created before Satanís power was broken by Jesus, or at that time, or yet to be created is not clearly stated in scripture. I donít see that it makes much difference. For it to have been created first would just show Godís ability to know things before they happen, in our concept of time. If it was created later, that just shows Godís sense of justice.