The recommended intervals for changing brake fluid are all over the board depending on the manufacturer, from as often as every two years to never. Really.
For example, Chevrolet says to change the brake fluid on most models every 45,000 miles, but Honda says to do it every three years regardless of the vehicle's mileage. Three years is also the recommended interval for most Volkswagens, but Mercedes-Benz vehicles typically call for fresh fluid every two years or 20,000 miles.
In contrast, on the Ford Escape, Hyundai Elantra, Toyota Camry and other models from those manufacturers, there are no recommendations for replacing the brake fluid, only instructions to inspect it periodically.
This leaves it up to the owner to consult what the manufacturer says in their car's maintenance schedule and rely on the advice of a trusted repair shop.
Brake fluid lives in a sealed system and can survive for years, but moisture from the surrounding air can work its way in through hoses and other parts of the brake system. Water in the brake lines lowers the boiling point of the fluid, so stopping ability can diminish in hard stops as heat in the system increases. In addition, over time the moisture can cause internal corrosion in the brake lines, calipers, the master cylinder and other components.
Flushing and replacing brake fluid might cost $100 or less on many vehicles, but replacing rusted brake lines and other parts can run several hundreds of dollars, so clearly there's value in keeping up with maintenance.
As a rule of thumb, it's wise to have the brake fluid inspected and perhaps tested for moisture content every few years and no more than every five if you live in a high-humidity area.
You might be able to tell it's time for a change by looking to see if the fluid is still fresh. Brake fluid is often light brown in color, but in some vehicles it's clear (at least when new) and will darken with age, becoming murky from water contamination. A better way is to have it tested by a professional for moisture and see what they recommend.
Brake fluid is as vital to stopping a vehicle as engine oil is to keeping it going, but it doesn't get as much attention as it deserves.