This is very much an individual question, as everyone has different requirements and reacts in different ways to fluid and food intake when running. It's just very much trial and error to find what works for you.
However, what you can do is start tracking your runs, time of day, how you feel, what you ate, things like that. Over time, you will get data such as "Ate right before run, felt really bad", or "Took gatorade, cramped up". Once or twice isn't really significant, but if you consistently cramp up or feel bad after doing something, you know that you shouldn't do that during a run.
The other thing is being able to tell what your body is telling you, such as if you are really tired, and should postpone or cancel your workout or if you are just kinda blah and should work out anyway. That will also show up if you track how you feel in your journal.
There's a lot of ways to go about it, but the biggest thing is just analyzing different situations and how your body reacted to it, to be able to know that when X happens, Y will follow soon after.