Typically, this is caused by a weak battery. Motorcycle batteries do not last as long as car batteries, and generally 1-2 years of use for a liquid battery is about average. Gel batteries last longer. It is simple enough to test your battery, just get a multimeter and test the voltage. 12.4v or higher should be enough to start your bike. Any lower than that, and the battery will struggle. This is a good test but not entirely conclusive, as some defective batteries will have good voltage, but poor amp output.