Well first of all, you will receive low battery warnings, giving you a chance to change your settings or simply remind you to put your LightBug on charge. Usually you will get a few days notice. Charging takes less than 30 minutes using any standard MicroUSB charger.
If your LightBug was lost and depleted its battery giving you location updates, it will switch off. It will then wait until the solar panels have charged it up enough to send another location update. This means it's never truly lost, provided it's in a place where it can get some light.
For example, if you're tracking a stolen bike which was being transported somewhere dark over several days and LightBug's battery died after giving you 300 location updates, you'd still be able to find it once the thieves took it out of the truck and it saw some sunlight again.
Sorry but we're not magicians. Flat batteries batteries might happen if you're using the locate or fitness functions regularly. Please refer to the "Clever Power" section above.