Attach the black wire coming from the light to the top right nut on the switch. Normally youll see a red wire in places you would expect a ceiling fan.

Smarthome Forum Ceiling Fan Light Puzzle
Light switch red wire. Attach the red wire coming from the light to the top left nut on the switch. If you change a light fixture and find a red wire in the electrical box chances are the black wire from the fixture needs to go to the redwire in the box. Twist the two white wires together and attach a wire nut. It could be there is or once was a three way switch in play. Check the wire with a non contact voltage tester with the power and. 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.
When you see a red wire in a light switch box it can mean two things. The exact purpose of a red wire for a light fixture can vary. Or it could be the red wire is the wire going to the fixture and the black wires are the live wires. More about wiring a light fixture. Well cover the easier scenario first. Except in rare cases it is a hot wire or a switched hot wire.
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. 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.