Issue motorcycle start with Arduino
First of all, relay beginner FAQ #1: use a freewheel diode across the relay coil or you might damage whatever you are driving it with.
It is also very common to get a big voltage surge when you turn on the ignition on vehicles, particularly 12V ones, because of starter motors etc. If you know what you are doing, you can try to hook up a big aluminium electrolyte bulk cap before your voltage regulator, some 500uF or larger.
It could also be transients or EMI causing the hobbyist electronics to become erratic. At a minimum you should add a 18V TVS or so at the input, but the strongly recommended solution is to remove the hobbyist electronics from the bike. You could cause some serious traffic accidents.