First, the bad news: The Raspberry Pi has no "sleep mode" - it simply does not exist. The good news is that Raspberry Pi doesn't use a great deal of power when it's running, BUT you should compare these power consumption figures against your battery capacity.
There are some "tweaks" available to further reduce power consumption; e.g. some hardware can be disabled via configuration file, and clock speed can be reduced. Here are some specific suggestions, on reducing power consumption, and here are some more If you're interested in minimizing power consumption in this way, determine what hardware resources you can live without, and edit your question (or post a new one); we'll try to help.
I'll organize my answer to your question under 3 headings:
1. Brute force power removal
As far as allowing your users to switch the device on and off, perhaps the simplest solution is to wire your battery lead (positive side) through a switch. You can buy a switch that is said to do this from several vendors; e.g. this one from Amazon. The advantage this solution has over the one below is that power consumption is reduced to ZERO. However, be aware that there are a couple of cautionary notes for this approach:
1. Powering off your RPi by removing power may create file integrity issues on your SD card, and is not considered good practice. In any event,
fsck will be invoked on the next boot sequence, which will require additional time to boot.
2. Some of the hardware sold in the "hobbyist market" is not manufactured to the highest standards. Be aware of this, and look out for new issues with your RPi after adding new hardware.
2. Minimize power consumption via
Given these drawbacks, perhaps a better alternative to the power switch described in the previous paragraph is to use the GPIO pins with a script to control the Pi's state. However, you should note that the RPi will continue to use power (approximately 60 mA) after the
shutdown command takes effect. Basically, this solution takes the following steps:
Halt the RPi (via the command
sudo shutdown -h now). [see Note 1]
Restart the RPi by connecting pin GPIO3 to Ground. This can be done using a "momentary" pushbutton switch that shorts GPIO3 to GROUND.
One clever way to configure the momentary pushbutton switch to "toggle" the RPi between OFF and ON is to monitor the state of GPIO3 in software, and execute a script that runs the
shutdown command above to halt the system. Once the system is halted, the next push of the toggle button will restart the RPi. This technique is covered in more detail here.
Of course there are other ways to halt the system, and then use the momentary pushbutton to restart it. For example, you could add a line in your
crontab file to shut the RPi down at a designated time (at 9:00 PM for example), then turn it on again by pressing the momentary pushbutton switch. Or you could write a script to monitor usage of some resource, and
shutdown based on that usage.
3. Add hardware modules to achieve (near) ZERO power
There are other solutions that, for example, use an Arduino micro-controller to effect a switch closure and RPi
shutdown in lieu of the momentary pushbutton described above. These solutions offer the potential advantage of a complete zero power shutdown without the increased risk of file corruption from an abrupt removal of power.
OTOH, if you'd like an "add-on" bit of hardware that will effectively add a "sleep mode" to your RPi with minimal effort on your part, you may want to look at WittyPi, or Sleepy Pi 2.
Your question has thrown a light on an interesting and challenging problem, and as you can see there are a number of solutions that have been developed to tackle that problem.
Suggest you try something simple to start, then build on that. You can post specific follow-up questions once you've got the basic functionality working.
NOTE 1: Although
shutdown commands are implemented somewhat differently, there is no difference in power consumption once the machine is in this state.