Angels were created
Exodus 20:11 (KJV)
11For in six days the Lord made heaven and earth, the sea, and all that in them is...
John 1:3 (KJV)
3All things were made by him; and without him was not any thing made that was made. (emphasis mine in both verses)
From these verses we see that angels were indeed created.
Job 38 refers to angels
It does seem that Job 38:4-7 is referring to angels. The other places in the Bible where this phrase (the Hebrew "ben elohim") is found are Genesis 6:2-4, Job 1:6, and Job 2:1. There is debate on whether the "sons of God" in the Genesis passage are angels; however there seems to be a consensus that the Job passages are referring to angels. This, plus a lack any other suitable candidate, suggests that these "sons of God" were angels.
Angels were created before the earth
Job 38:6-7 (KJV)
6Whereupon are the foundations thereof fastened? or who laid the corner stone thereof;
7 When the morning stars sang together, and all the sons of God shouted for joy?
God uses a building analogy, referring to the "foundations" and "corner stone" of the earth. He says, in a very poetic way, that when the foundations of the earth were laid (i.e. when the earth was created), the sons of God (angels) shouted joyfully.
This would indicate that angels were created before the earth. So when was the earth created? The earth is present in Genesis 1:2 and the first day ends in Genesis 1:5, so the earth was created on day 1. For angels to be present when the earth was created, they must have been created on or before day 1. Since angels seem to be within our space-time (Daniel 10:13), I conclude that angels were created on day 1, before the earth.*
A survey of Job 38 and related passages indicates that angels were created on the first day. As with anything the Bible does not explicitly state, I would not be dogmatic about the issue, but after searching the scriptures, this seems to be the best solution.
*This passage says that a demon prevented an angel from contacting Daniel for 21 days. My conjecture is that for this angel be delayed for 21 days, he must be part of our space-time. I freely admit that this is pure speculation on my part, but I don't think it's an unreasonable assumption.