Having an audio alert device while scuba diving is important in order to get other people's attention. If you're underwater, you may need to get your dive buddy's attention or the dive guide. Keep in mind that sound travels 4 times faster underwater, so it's easier to hear the sound underwater. On the surface, you may need to signal your dive boat of your location if you surface away from the boat or anchor line.
There are alert devices that connect to your BCD power inflator and emit a loud sound underwater and on the surface. A simple whistle is great to have attached to your BCD for use at the surface. This is also something you can easily attach to a snorkeling vest as well. An underwater rattle is also a great way to get your buddies' attention. A tank banger is like a large rubber band with a plastic ball attached that slips over your scuba tank. Just grab the ball and let it go to "bang" against your tank. If you have a dive knife with a metal end on the handle, you can use this to bang against your metal tank to get divers' attention underwater as well.
Having a visual alert device is also a good idea while scuba diving or snorkeling. A SMB (surface marker buoy) is long, bright, and easily seen by a dive boat or airplane at the surface. If there's lots of boat traffic, it will work well to signal your location as you complete your ascent and before you hit the surface. A dive flag attached to a surface float will signal to boats and other water craft that there are divers in the area and to stay away.
A finger reel is perfect to clip to your SMB so you don't lose track of the SMB if you let go either underwater or at the surface. Using a reel and SMB can be a bit tricky, so it is recommended you have an instructor show you the proper way to deploy it and practice in a pool.
Communicating underwater can be a bit tricky, so an waterproof dive slate or wetnotes will allow you and your dive buddy to communicate during the dive. It's also a great way to jot down your dive plan before you get in the water so that you remember the agreed upon depth and time limits. You can also use it to draw out a map of the divesite or make notes of marine life that you saw for future reference. Wetnotes are usually a collection of waterproof paper which is perfect when you want to save your notes for future dives.