There is no magic bullet (or food or drink) that will suddenly transform you from an average singer to an Idol finalist. However - what you eat or drink prior to singing can have an effect on your voice and should certainly be carefully considered.
The most important thing you can do (as mentioned by others) is to be sure your body is well hydrated. Your vocal apparatus consists of mucous membranes and other tissues that function best when fully hydrated. If your body lacks proper hydration, all the tissues in your body are at greater risk of injury and may fail to function at their optimal level.
You can't hydrate just your throat and vocal folds by drinking a gallon of water right before you sing. To obtain the optimal fluid balance in your vocal apparatus, you must achieve full body hydration on a cellular level in advance. To do that - start drinking plenty of fluids at least two hours before you sing (or just make a healthy fluid intake level part of your daily routine). Also prior to singing, you should avoid chemicals that dehydrate your body such as caffeine and alcohol and non essential over the counter medications that list dryness as a side effect.
When I have a performance coming up where I will be singing, I start planning at least a day ahead by drinking plenty of water and cutting back on coffee and avoiding alcohol the day before (and day of) a gig. I'll wait until after the show to enjoy an adult beverage (as long as I am not performing the next day).
I try not to eat a big meal prior to singing. I don't want my energy and blood supply being diverted to digestion (or anything coming back up during my performance).
As mentioned by Joseem, you should avoid foods which might result in acid reflux. I have had bad luck with the citric acid in fruit juice tightening up my throat. Extremely salty foods might tend to dry out your throat if eaten right before singing. Have you ever seen what happens when you pour salt on a slug (don't try it)? You do need salt in your body - but gradual and regular intake is the way to get the salt (just like water) into your system on cellular vs. topical level.
On stage I keep room temperature (not cold) water to keep my throat wet and maintain hydration. If I had a thermometer I might shoot for body temperature water.
I also keep a plastic jar of raw, organic, honey (not processed) and take a shot every now and then. For whatever reason it seems to help me personally - but I can't cite any scientific studies that prove it's efficacy for singers. I have read of some science that confirms that raw honey is a natural anti inflammatory and anti oxidant. And it seems to act as a temporary lubricant for my throat.
Some of my performing friends use products such as Singer's Saving Grace, Entertainer's Secret or Vocalzone Throat Pastilles. I have not personally tried these and don't know if their perceived effectiveness is real or imagined. I would hesitate to take the marketing hype on the websites as gospel. These products tout various ingredients as having lubricating and anti inflammatory properties.
The only thing I am absolutely positive that works from personal experience - and has plenty of science behind it is proper hydration. It's guaranteed to make a difference! But you must start the process of full body hydration well in advance of your performance. Good luck and have fun!