Satan's Access to Heaven
If God does not allow sin into heaven, why is Satan allowed entry to accuse the brethren?
I am going to take your question at face value. I'm guessing that you may have heard someone say, "God does not allow sin into heaven." I know I have heard some folks say some similar things in the past. I disagree with them for exactly the reason you pointed out-Satan is allowed to come before the Lord on occasion. However, I also think that these people are probably trying to make a valid point, namely, God will not allow a sinful creature to make his permanent residence in heaven. That is true.
Not only does a sinful creature like the devil have access to the throne of God, but those of us who are redeemed by the blood of the Lamb also have access to His throne as well- Hebrews 4:15-16 "For we have not an high priest which cannot be touched with the feeling of our infirmities; but was in all points tempted like as we are, yet without sin. LET US THEREFORE COME BOLDLY UNTO THE THRONE OF GRACE, that we may obtain mercy, and find grace to help in time of need." That means that other sinful beings are also able to come before him. Although you and I may not appreciate the access that the devil has, I'm sure that you would agree that we are thankful that the Lord allows us, sinful as we are, to come before Him.
As far as the devil's access to heaven, here's what I think: Isaiah 14 records the original fall of Lucifer. We know him as the accuser of the brethren, the devil. Obviously, the Lord has a plan, an ultimate destiny for the devil (Matthew 25:41). That plan will not come to fruition until Revelation 20:10 ("And the devil that deceived them was cast into the lake of fire and brimstone, where the beast and the false prophet are, and shall be tormented day and night FOR EVER AND EVER."). Once the devil is out of the picture completely, the Lord will destroy the heavens and the earth and replace them with new heavens and a new earth. This is described in 2 Peter 3:12-13 "Looking for and hasting unto the coming of the day of God, wherein the heavens being on fire shall be dissolved, and the elements shall melt with fervent heat? NEVERTHELESS WE, ACCORDING TO HIS PROMISE, LOOK FOR NEW HEAVENS AND A NEW EARTH, WHEREIN DWELLETH RIGHTEOUSNESS." At this point, there will be absolutely no possibility of sin or the author of sin messing these places up! This is when the statement that God will not allow sin in heaven will be true.
In conclusion, let me say that although the Lord still allows the devil to have access to heaven, it is somewhat limited. Job 1-2 suggest that there are specified times in which the devil and his cohorts have to come before the Lord to present themselves. It is during these times that the devil accuses the brethren (Job 1:9-11; Job 2:4-5). We may not understand exactly why He allows the devil to assume this role, but we can trust the Lord that He has everything worked out exactly right-"For my thoughts are not your thoughts, neither are your ways my ways, saith the LORD" (Isaiah 55:6).
I hope I was able to give you a satisfactory answer. If we can be of any further help to you, please let us know. God bless you.