When you don't have enough water in your body, the body doesn't want to let any water out because then you will become extremely dehydrated. There's something called ADH (anti-diuretic-hormones) that basically controls the concentration of the urine, meaning amount of water that leaves through your urine. When it sees that there's not a lot of water in your body, it makes the urine be more concentrated with urea rather than water, this way you won't get too dehydrated... so the dark urine means that you have a high concentration of urea and not a lot of water... which is a message to drink more :). If you notice, when you drink like ALOT of water, your urine will probably be clear or light yellow because the ADH 'sees' that there's too much water, or just a lot, in your body and there's enough for your urine to contain a lot of water too, meaning you don't have a high concentration of urea, there's water instead. But, you will also go to the bathroom more often when you drink a lot because your body still needs to get rid of the urea that the liver produces.
Lol I had a biology test on this yesterday, I'm excited that you asked this question lol... sorry for the loonngg answer! ;)
not enough water and potentially too much sugar. I'm diabetc, when my blood sugar is high my urine is dark. if you start to smel fruity or sweet when you sweat that is the issue. probably though, put the coffee and the soda down and chug some water. urine should be clear.