Attach the black wire coming from the light to the top right nut on the switch. It could be there is or once was a three way switch in play.
Red House Wire
Red white black wires light switch. Electricians often use black red or blue wires to deliver electricity to a circuit from the main panel. Or it could be the red wire is the wire going to the fixture and the black wires are the live wires. The standard way to power a split tab outlet is to run a three conductor cable to a wall switch. Well cover the easier scenario first. When you see a red wire in a light switch box it can mean two things. The wire that will be hot when the circuit is completed to your light usually black traveler.
In existing 3 way wiring this wire toggles hot between two switches. All home electrical wires made in the us. The return wire for circuits usually white load. Twist the two white wires together and attach a wire nut. The cable has a black wire which connects directly to the circuit and a red wire which connects to the switch. The ground wire also connects to the switch but the white wire gets spliced to the circuit neutral wire and bypasses the switch.
They may use other colors for. The white wire is the neutral and all other colors are hot. Attach the red wire coming from the light to the top left nut on the switch. The hot wire from the breaker usually black neutral. Knowing which wire does what and goes where is imperative not only in the correct configuration of an electrical system but also for your familys safety. Follow standard color codes that identify each wires function in a circuit.