Why does the colour of urine vary from light to bright yellow when we do not drink water for a long time?

Urine is composed of water, certain electrolytes, and various nitrogenous wastes and urobilins. The yellow colour in the urine is due to the chemicals called urobilins. Urochrome was the original name given to that pigment thought to give urine its colour. It is now known that several related pigments are responsible, and therefore the original name has been dropped. These are the breakdown products of the blood's haemoglobin of red blood cells. 

The basic functional unit of the kidney is the nephron. There are more than a million nephrons in each kidney. These nephrons form urine by three precisely regulated processes. They are filtration, re-absorption and secretion. The total amount of water and other dissolved wastes removed from the blood each day by the kidneys is about 180 litres for a person of 70 kg. We neither drink this much water nor excrete it out in urine form. Large amounts of water are re-absorbed into the blood stream from the proximal tubules through the process of passive re-absorption. The nutrient glucose, which is the blood sugar, is entirely re-absorbed into the blood stream from proximal tubules. None of the nutrient is wasted in the urine. Sodium and other ions are only partially re-absorbed from the renal tubules back into the blood. Urobilins are not re-absorbed. Drinking large amount of water dilutes urobilin content of urine and makes it look clear. 

Drinking very little water, concentrates the urobilin content of the urine and it looks dark yellow as the body tries to maintain a constant amount of water within the body system. Any rise or drop in blood osmotic pressure due to a lack or excess of water is detected by the hypothalamus, which notifies the pituitary gland via negative feedback. 

When a person has not taken water for a long time, a lack of water causes the posterior pituitary gland to secrete antidiuretic hormone (ADH), which results in water re-absorption and an increase in urobilin concentration of urine making it dark yellow. Therefore it is the marker of dehydration and the need for water intake.

When a person drinks a lot of water, he must eliminate excess water from the body in order to maintain the water content. So, when the water content of the body is more, the production of antidiuretic hormone (ADH) is decreased and the collecting tubule becomes less permeable to water, rendering urine dilute and abundant and the urobilins and other nitrogenous wastes get diluted.

Source: thehindu.com