Its absolutely critical to hydrate properly before you start a running event. In fact if you are preparing for a long run you need to start the hydration process the day before.
As a guide to how well hydrated your body is, your urine should be very light in colour. If it's dark, it's concentrated and means you are dehydrated.
You should not have alcohol in the days leading up to the event. Alcohol will dehydrate you.
You should avoid caffeine before running. Caffeine is a diuretic and will therefore cause some dehydration. However, caffeine is also a stimulant and some will argue it can improve performance - setting aside the moral aspects of caffeine use. If you do use it, you should at least keep in mind its negative impact on hydration.
Start drinking to hydrate in the 24hrs before the run. There is much information as to how much you should hydrate before an event depending on the distance. However, you should also pay close attention to the conditions on the day. Running in heat - even just warm days - of just 13 degrees centigrade upward will lead to much faster dehydration than say 5-10 degrees as your body sweats.
Before a race hydrate with either water or a sports drink. Sports drinks will often contain electrolytes which are lost during the event and therefore useful. However, some prefer to keep to water for pre race hydration.
Aim to drink 1-2 litres prior to the event. In the final hour before hand stop drinking to avoid having to stop mid race. Hydrating during the event and post race hydration are covered separately.