Yes, you can and should leave your sump pump on (i.e. connected to your power supply) all the time, which will protect your home from excess water at all times. However, the pump shouldn’t be constantly running (i.e. pumping) because this will cause the components to wear quickly, potentially leading to pump failure. The pump should only kick in once water enters your basement and reaches a certain level in the pump pit.