For the headlight, always have a constant on for safer viewing of the road, except when there are high traffic areas where there are multiple ports onto a main street. Sometimes when drivers are turning onto the main street they do not see the biker easily and switching the headlight to a flashing mode notifies them more easily and an accident is prevented. I cannot tell you how many times I have had to watch the driver to make sure they do what they are supposed to do and the flashing headlight just made my job easier in that case.

The rear light should only be flashing where street lights are nowhere in existence and only automobile headlights light the road. This lets the driver know well in advanced that there is something out there and to plan ahead.

Then again, most bicyclists do not use the headlights and rear bike lights accordingly and try to just have maximum battery life without being safety conscious.