Repellents or noisemakers may help in the short run, but when deer get used to the smell or noise ("habituate"), they will come back to browse once again. The only certain way to keep them out is with a tall (8-foot) fence (there are a number of deer fencing plans available). Fortunately, vegetable gardens tend to be rather small and compact—and easier to fence than other portions of a landscape.
You can read a lot about keeping deer away from plants by searching through the Internet Center for Wildlife Damage Management Web site (Deer Fencing and Control).