The testicular vein is responsible for draining deoxygenated blood from the testes to the inferior vena cava or the renal vein, depending on the side. It plays a crucial role in the thermoregulation of the testes, which is essential for proper spermatogenesis and fertility.