How to update MCU application
You have asked somewhat absurd question. 


  Do I have to re-code it ?


Of course! Start off by reading datasheet and listing what peripherals you used in your project. Although L0 is probably low power variant of F0, but you cannot guarantee everything is the same. For example, L0  operates at 32 MHz (maximum) but F0 can be clocked to 48 MHz and it doesn't seem to have "factory tested" USB hardware like L0.

Next thing to do is adapt your code. They both are Cortex M0 so the instruction set is the same and as I said before, change the code to suit the peripheral changes.