Hot water turns yellow for a number of reasons, including sediment in the water heater tank or colony of iron bacteria. It isn't always a sign that the hot water heater needs to be replaced, but it's something that might require a plumber to fix.
Iron bacteria thrive in cool, watery, oxygen-deprived environments, which means they multiply when the heater isn't in use. Additionally, mineral sediment collects in the hot water tank over time because water is stored there until it's used. Another simple reason for yellow hot water is the presence of rust from the corrosion of iron plumbing.