In order to answer your question we must first determine what Sons of God refers to. The answer to that goes back to Genesis chapter 6.
Genesis Chapter 6:1 through 7 KJV
1 And it came to pass, when men began to multiply on the face of the earth, and daughters were born unto them,
2 That the sons of God saw the daughters of men that they were fair; and they took them wives of all which they chose.
3 And the LORD said, My spirit shall not always strive with man, for that he also is flesh: yet his days shall be an hundred and twenty years.
4 There were giants in the earth in those days; and also after that, when the sons of God came in unto the daughters of men, and they bare children to them, the same became mighty men which were of old, men of renown.
5 And GOD saw that the wickedness of man was great in the earth, and that every imagination of the thoughts of his heart was only evil continually.
6 And it repented the LORD that he had made man on the earth, and it grieved him at his heart.
7 And the LORD said, I will destroy man whom I have created from the face of the earth; both man, and beast, and the creeping thing, and the fowls of the air; for it repenteth me that I have made them.
Here we see that the sons of God refers to a state of Holiness, or if you will a companionship with God. This was lost in the cross breeding between the descendants of Seth and those of Cain.
That was the reason God caused the flood of Noah's time. But God found Noah and his sons to still be in that state of holiness, and therefore saved them as sons of God.
Gen 6:8 KJV
But Noah found grace in the eyes of the LORD.
So there were still some sons of God still on the Earth.
Job 1:6 KJV
Now there was a day when the sons of God came to present themselves before the LORD, and Satan came also among them.
We know that this happened on the Earth because:
Revelation 12:9 KJV
And the great dragon was cast out, that old serpent, called the Devil, and Satan, which deceiveth the whole world: he was cast out into the earth, and his angels were cast out with him.
Luke 10:18 KJV
And he said unto them, I beheld Satan as lightning fall from heaven.
But man still had the capacity to sin and break that fellowship with God, and would no longer be sons of God.
When Jesus came and died on the cross then rose again on the third day, he provided the path for salvation, in other words man could no longer be a son of God, once he sinned, but through Salvation man could be adopted back into the fellowship with God. Since man was no longer a natural son of God due to his sin, he now became an adopted son of God.
The following references are from the King James version of the Bible and describe the process of adoption through Salvation.
John 1:12 But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name:
Romans 8:14 For as many as are led by the Spirit of God, they are the sons of God.
Romans 8:19 For the earnest expectation of the creature waiteth for the manifestation of the sons of God.
Philippians 2:15 That ye may be blameless and harmless, the sons of God, without rebuke, in the midst of a crooked and perverse nation, among whom ye shine as lights in the world;
1st John 3:1 Behold, what manner of love the Father hath bestowed upon us, that we should be called the sons of God: therefore the world knoweth us not, because it knew him not.
1st John 3:2 Beloved, now are we the sons of God, and it doth not yet appear what we shall be: but we know that, when he shall appear, we shall be like him; for we shall see him as he is.
Hope this answers your question.