From dusk to dawn you must have a white light at the front and a red light at the rear, visible from 300 metres. Police enforce this actively, especially in autumn - expect a fine of around 700 kr per missing light.
Rental bikes normally come with lights fitted; check they work before you ride off, and that includes share bikes.