Onion and garlic have long been regarded as sacred foods with medicinal and spiritual value. Evidence for their elevated status historically can be found as far back as thousands of years ago in Egyptian and Indian cultures to name a few. Garlic for example was believed to provide protection and prepare soldiers for war. In the Egyptian culture, onions represented eternal life, due to their endless spirals, and were often shown in spiritual drawings and placed in the tombs of their Pharaohs.
My belief is that the added spice and flavor that these foods provide to almost all other foods was Mother Nature's way to encourage us to eat them frequently for their endless health benefits.
Both onions and garlic contain an active ingredient called allicin, an organosulfer compound, which is responsible for their antifungal, antibacterial and antiviral properties. The high sulfur content is also the reason that onions let off eye-irritating gasses. However, this should be considered a good thing because the more pungent the onion, the more antioxidants it contains. This is why red and yellow onions are the best for obtaining the maximum health benefits. These same sulfur containing compounds are also responsible for the smell associated with garlic, as has been amusingly referred to as the "stinking rose". However, this shouldn't dissuade you from taking advantage of its many healing benefits, including the ability to stimulate the immune system and make it easier for the body to fend off and fight disease.
Garlic in particular has received the most attention for it's medicinal properties and has grown in popularity at an astonishing speed. In the U.S. alone, consumption tripled during the 1990's and garlic sales are only second to those of Echinacea for herbal supplements.
Garlic has been recommended heavily for the treatment of the common cold, upper respiratory tract infections and bronchitis for its ability to relieve congestion. Garlic is also said to be beneficial for preventing and reducing cancer tumors and promoting cardiovascular health due to its anti-inflammatory properties.
Garlic is also effective for treating bacterial and fungus infections such as those related to Candida and/or yeast overgrowth.
Onions, being part of the same family as garlic, contain many of the same properties. They are high in polyphenols, especially the flavonoid called quercetin, an antioxidant that reduces cell damage by neutralizing free radicals.
Quercetin too is an anti-inflammatory, which also supports heart health, low cholesterol, and the prevention of cancer.
Onions also improve red blood cell function as well as bone density, important for the prevention of osteoporosis. Both onions and garlic are said to be anticoagulants, which means that they thin the blood to prevent heart attacks and strokes.
And, onions are even said to reduce swelling and pain from insect bites, possibly even preventing them with regular consumption.
There is no doubt that these two foods are extremely powerful in their ability to protect and heal, but its important to understand that like all foods, they are best consumed raw to reap these benefits. Garlic is most effective when cutting or chewing it fresh as opposed to eating whole cloves or even taking supplements. If this doesn't seem tolerable to your palate, you can blend garlic into raw soups, sauces and even juices. Three to five cloves a day is enough to obtain the benefits.
With onions, you'll want to avoid over peeling them as the highest antioxidant content is present in the outer layers. They also maintain their maximum nutrient content when consumed raw (chopped or blended into pates and sauces) or lightly cooked at low to medium temperatures. A half of a medium onion a day is a great place to start and both onions and garlic can be consumed on a daily basis.
Wilson, E. (No date). History of the onion. Retrieved from http://www.herballegacy.com/Wilson_History.html 
Mercola, J. (2009, February 17). Chemists shed light on the health benefits of garlic. Retrieved from http://articles.mercola.com/sites/articles/archive/2009/02/17/Chemists-Shed-Light-on-the-Health-Benefits-of-Garlic.aspx
Motteshard, T. (No date).
History of garlic. Retrieved from http://www.herballegacy.com/Motteshard_History.html 
Fassa, P. (2010, September 10).
Why you must make garlic a daily super food. Retrieved from http://www.naturalnews.com/029701_garlic_superfood.html
University of Maryland Medical Center (No date).
Quercetin. Retrieved from
Whfoods.org. (No date). Onions: what's new and beneficial about onions. Retrieved from http://whfoods.org/genpage.php?tname=foodspice&dbid=45