Raccoons are resourceful creatures, and if you have a garden or offer easy access to leftovers and garbage cans, they are likely to make your home a frequent stop. While they're generally harmless, they can cause serious damage to your garden and put your pets in danger.
Raccoons are sensitive to a number of things, including the taste and smell of hot peppers. One way you can take advantage of this is to make your own pepper spray by mixing powdered or ground pepper (both cayenne and jalapeno will work), putting it inside a spray bottle and spraying near garbage cans or around the garden. You can also try forming a circle around the garden's edges to deter raccoons from entering the area.
Aside from chemical solutions, you can do a number of practical things to keep raccoons away. Anything that produces a loud noise or bright light at unexpected times is likely to scare the animals away--radios and blaring music, recorded barking sounds, flashing lights and siren and strobe devices. There are also a number of noise bombs and shell crackers that can be used to deter animals from approaching the area. All these elements are more effective if used at different times, so the animals don't get used to a specific schedule. Also, they are better if used right before sundown, when raccoons are most active, as well as a few hours into the night.
Visual deterrents may work with raccoons as well. Traditional scarecrows can work, especially if you add noise or light to the figure, so animals can confuse it with a living person. Scarey Man, a brand name for an inflatable version of the scarecrow, comes with its own horn and can be bought at retail shops or online. Tin foil, plastic strips and balloons can also work, but the solution is often just temporary and eventually the animals will realize there's no danger and come back.