Seeing as the question originates in UK, the ANO is the required reference.
Display of lights by aircraft
47.—(1) During the night an aircraft shall—
(a) display such of the lights specified in this Section as it is required by this Section; and
(b) subject to rule 49(6), not display any other lights which might obscure or otherwise impair the visibility of, or be mistaken for, such lights.
(2) Subject to rule 48(4) an aircraft fitted with an anti-collision light shall display that light in flight during the day.
(3) A flying machine on a United Kingdom aerodrome shall—
(a) during the night display either the lights which it would be required to display when flying or the lights specified in rule 49(5)(c) unless it is stationary on the apron or on that part of the aerodrome provided for the maintenance of aircraft; and
(b) during the day and night and subject to paragraph (4), display a red anti-collision light, if it is fitted with one, when it is stationary on the apron with engines running.
(4) A helicopter to which article 38 applies may, when stationary on an offshore installation, switch off the anti-collision light required to be shown by paragraph (3)(b) as long as that is done in accordance with a procedure contained in the operations manual of the helicopter as a signal to
ground personnel that it is safe to approach the helicopter for the purpose of embarkation or disembarkation of passengers or the loading or unloading of cargo.
Failure of navigation and anti-collision lights
48.—(1) Paragraphs (2), (3) and (4) shall apply to aircraft in the United Kingdom.
(2) An aircraft shall not depart from an aerodrome if there is a failure of any light which these Rules require to be displayed at night and the light cannot be immediately repaired or replaced.
(3) Subject to paragraph (4), if the aircraft is in flight and any such light as is referred to in paragraph (2) fails and cannot be immediately repaired or replaced, the aircraft shall land as soon as it can safely do so, unless authorised by the appropriate air traffic control unit to continue its
flight.
(4) An aircraft may continue to fly during the day in the event of a failure of an anti-collision light provided the light is repaired at the earliest practicable opportunity.
The answer is, at least in UK, that lights must always be displayed by aircraft covered by the civilian air navigation regulations.
Military aircraft are not covered and will sometimes be flown without normal navigation lights or anti-collision lights (such as when using night vision devices). These flights are usually NOTAM'd.
I know of one commercial pilot here in UK who was fined £2000 by the CAA after a circuit breaker popped. He took off in the dark without navigation lights and was reported by ATC.