How should I connect a light fixture to this box with four cables?
This is not even close to the box from hell.
Why are there 4 bare copper , your home was wired with grounded NMB type cables each cable has a ground so there are 4 how can I tell? The number of and colors of black white &amp; red wires. All the grounding conductors or bare copper should be connected together.
Why is there only 1 red wire. This cable is quite normal in a ceiling fixture, if you pull the light switch you will probably find the other end of the cable in that box. Red and black are “hot conductors” normally 1 for a light and the other for a fan. What is the brown cable for? Without knowing how things were connected we can only guess but there are many colors of nmb cable I have seen brown in the past there is nothing special about the color in this case modern coloring identifies the wire size white is 14 awg , yellow is 12 awg and orange is 10 gauge. This is not always the case as this is a more recent change in the past they were all white for the most part. Gray usually             identifies the cable as UF or underground feeder.
You ask if this is safe? Was a light hooked up previously? And how was it wired? I would say it probably was safe but now to get it back to a safe state we will need to know where the wires go to connect them up safely.  The red cable that is all tied together is probably a spare we can’t tell if this was a switch loop or how it was connected but be aware that white is quite often a switch leg or loop where white carries the power to the switch. To give more information on how to connect things properly we will need to see the connections at the switch(s) and we need to know which cable provides the power.  If you took photos prior to disassemble i it that could be quite helpful also.