Honda Accords of this period (1998-2002) as well as other models are known to have issues with their ignition switch. After 100K miles/10+ years, my car would randomly die while driving and after replacing the ignition switch, the problem never returned. One indication that it might be the ignition switch is if your car ever fails or hesitates to activate the starter when you turn the key to start the engine. Another simple cause could be worn or loose battery terminals (always check the easy stuff first)!