While windshields aren't strictly necessary for the gentle game of golf, they are available and there are some surprising things to keep in mind about them.
As with other windshields, once upon a time they were made of glass, but the world of acrylic plastics has caught up with them. These are more robust and flexible, and don't have to be subjected to the same stresses as automobile windshields. Still, they are susceptible to scratches and dings, and with time UV rays will cause the plastic to become discolored. Eventually, they will become too brittle to repair but that will take quite a long time: years at least, decades possibly, as this sort of material can also be used in aircraft windshields.
Repairs to acrylic windshields aren't too much of a problem and are definitely within the financial reach and skill set of the average duffer. Routine maintenance consists generally of keeping the windshield firmly fastened in place and keeping it clean. Suitable cleaning fluids are available at golf shops or through the Internet. Proprietary kits allow for the restoration of heavy scratches, pitting and UV hazing and opacity. Again, these are easily available. They use special compounds and tools/applicators and are sometimes extravagant in their claims — repairs can be done it minutes and are so simple that the manufacturers of some offer to pay you to do repairs with their kits, while others urge you to do the repairs as your own little business on the side. No doubt these are for the most part valid offers, but do your own due diligence and make sure you're not being taken.
The more interesting facet of these windshields is the protection factor: they have to protect riders from the consequences of wayward golf balls. There has recently been a certain amount of research on this topic, as several urban areas (such as Palm Desert, California, and the University of Illinois) have been promoting the idea of using golf-carts (or "golf cars") for getting around; they take up little space either moving or parked, they are electrically-driven and so much less polluting, and being low-speed can't cause as much damage in case of accident. The difference between a golf-cart and a golf-car is that the former doesn't exceed 20mph (more like 10-15mph); the latter goes up to 25mph but faster than that, it's a car. The authorities in such areas needed to make a decision on the type of windshield and glazing to be used, to provide passengers with adequate protection from windshield damage.
The National Highway Traffic Safety Administration (NHTSA: an agency of the DOT) has a number of relevant standards. AS-1 glazing will stop a golf ball at the maximum velocity that your average male golfer can achieve, but the glass will shed possibly dangerous fragments. AS-6 motorcycle acrylic windshields shattered at over 125mph — not all that fast! Tests of a polycarbonate plastic glazing stood up to impacts of 225mph. Now a vehicle moving at 18mph (away from the gold course) cannot possibly encounter such impacts under normal circumstances - and a golf ball packs enormous momentum because of its small size — so the Agency decided that an AS-5 glazing (which isn't quite as tough as the polycarbonate glazing but for which the standards include an abrasion test) or an AS-1 would be suitable for golf-car use. AS-5 is the standard for golf-carts used strictly on the golf course.