The best time to fit rail tape is before the board gets marked. New boards, premium composite SUPs, race boards, foil boards and surf SUPs are all worth protecting early, especially if they will be used regularly, transported often or shared with less experienced paddlers.
You can also add protection to a used board, but take more care with preparation. The surface should be clean, dry and free from salt, wax, grease, sand and loose damage. If there is existing damage, repair or seal it properly before applying rail tape.
For race and touring boards, clean fitting matters because the tape should sit neatly and evenly along the rail. Take your time rather than rushing the installation just before a session.