Atmel SAMC21 microcontroller unwanted resets
is there anyway to know what are the different reasons these resets could be due to, so that I investigate? 


Yes - read and act on (or display etc.) the RCAUSE register when the MCU restarts (i.e. examine it at the start of your code), as mentioned in the SAM C21 "complete datasheet". That register contains the reason for the last MCU reset.






Software bugs might also be able to trigger resets e.g. a fault triggered in a fault handler (reset cause SYST in the RCAUSE register), in addition to the more obvious Watchdog reset (if you are using the Watchdog).

From your question, we don't know when these resets started during the development of your project. When you think back to when they started, you might be able to identify a change or set of changes just before they started, to give you a focus for your troubleshooting.

There are several troubleshooting techniques you can also use. A straightforward one (although it has limitations) is to simplify your project, step-by-step, making sure you can reverse each step of the simplification, until the problem stops happening. Then consider the implications of the simplification change you last made before the problem stopped.

Considering the project, a power-related problem seems quite likely and that may need investigation of the schematics, board layout and wiring etc. to troubleshoot it in detail, as well as use of an oscilloscope. Depending on whether the problem happens with the "ebike" stationary or not, you may have other challenges to the troubleshooting. Good luck!