The exact purpose of a red wire for a light fixture can vary. Turn on your power and test the switches.

Black White Wire Switch Wiring Diagram Wiring Diagram
Red wire light switch. Attach the red wire from the light fixture to the nut at the top left of the switch. Except in rare cases it is a hot wire or a switched hot wire. But in places like a bathroom or a wall light if you see a red wire its a good bet that the red wire is the wire thats connected to the light switch. Red wire on the light fixture step 1 turn off the power to the light circuit then check the wires with a voltage tester to verify there is no voltage reading. It could be there is or once was a three way switch in play. So the red wire is probably the one you want.
Normally youll see a red wire in places you would expect a ceiling fan. When you see a red wire in a light switch box it can mean two things. In my friends case the solution was simple if not intuitive. Connect the bare copper wire to the green nut at the bottom left of the switch. The wall switch typically when a ceiling fan is installed the red wire is most commonly used for the light and the black is commonly for the fan motor. Well cover the easier scenario first.
The red wire as a spare wire when a ceiling fan is not installed this spare red wire is insulated with electrical tape or capped off with a wire nut. Check the wire with a non contact voltage tester with the power and. Or it could be the red wire is the wire going to the fixture and the black wires are the live wires. Push both switches into their boxes and secure them with screws at top and bottom.