Diuretics
These drinks contain minor diuretics. Caffeine is the diuretic found in tea and coffee. Alcohol is the diuretic in beer. Diuretic substances increase the amount of urine produced i.e causes dehydration. This is often offset by the water content of mild diuretics like tea, coffee, and alcoholic drinks.
Tea, coffee, and coke
Caffeine belongs to the xanthines, and inhibits re-absorption of Na+ by cells, and increases flow rate of filtered fluid through the kidneys. This reduces water content in your body. In other words diuretics do dehydrate you, specifically caffeine will. Coffee, coke, and tea (very low doses of caffeine) are mild diuretics.
Beer
On the other hand alcohol is an anti-diuretic hormone inhibitor that inhibits arginine vasopressin.