When did sin and evil in the universe first appear? According to Catholicism and Protestantism (I am not aware of any division over this) When did evil in the universe first appear and what was the originating cause of it? 

Note: I mean the immediate cause not the predetermined purpose that God had in allowing its appearance. Aside from any possible sense of a cause in God's sovereignty, when was the immediate and original appearance of evil in the universe?
When sin is defined as moving against God's will and evil is defined as the absence of God's presence it seems that sin and evil were first made when Lucifer rebelled against God and was cast from his position of glory and out of God's presence. The story is somewhat detailed in Isiah.


  “How you are fallen from heaven,
  O Lucifer, son of the morning!
  How you are cut down to the ground,
  You who weakened the nations!
  For you have said in your heart:
  ‘I will ascend into heaven,
  I will exalt my throne above the stars of God;
  I will also sit on the mount of the congregation
  On the farthest sides of the north;
  I will ascend above the heights of the clouds,
  I will be like the Most High.’
  Yet you shall be brought down to Sheol,
  To the lowest depths of the Pit.  Isiah 14


From the verses we see that Lucifer first sinned when he claimed that he would ascend to God's glory and usurp Him from His throne. He was removed from God's presence which then created evil. 

This is the oldest account of sin and evil. It must have preceded the fall of man because it was Lucifer who tempted them to take and eat the fruit. Before we know assuredly that mankind was not in sin nor removed from God's presence, therefore, sin and evil must have originated with Lucifer, or at least not with mankind. Such is Lucifer's infamy that he is called the father of lies and Satan which mean adversary, which implies that he moves against God's will always.

It is possible that sin and evil originated elsewhere but they are not detailed in the 66 book version of the Protestant Bible. The other seven that Catholicism takes does not say anything on the topic either.

These verses in Revelation may be relevant:


  Then war broke out in heaven. Michael and his angels fought against the dragon, and the dragon and his angels fought back. But he was not strong enough, and they lost their place in heaven. The great dragon was hurled down—that ancient serpent called the devil, or Satan, who leads the whole world astray. He was hurled to the earth, and his angels with him. Revelation 12


Here we see that Satan is permanently cast from heaven. Most scholars would argue that this event has not happened yet, and will occur shortly before the Second Coming. What may also be relevant is the passages in Job where Satan is actually conversing with God.


  One day the angels came to present themselves before the Lord, and Satan also came with them. The Lord said to Satan, “Where have you come from?"
  Satan answered the Lord, “From roaming throughout the earth, going back and forth on it.” Job 1


The conversation continues but what is noteworthy is in the first few verses. It is clear here that Satan can still enter God's presence, but he can also leave it. This supports the idea that he was 'cast' from heaven already, in some respects. How is a bit of a mystery. The issue with Job is that a good portion of scholars, but not near the majority, would say that it is poetry and cannot be taken as a literal event.