If you are obtaining an FHA, VA or USDA mortgage, the FHA/VA testing is typically required as a minimum. Some lenders will also require it on a conventional loan. Check with your lender to determine their requirements. Testing the Well water is highly recommended regardless of whether or not it is required by the lender.
Once you own the home, the EPA recommends retesting the water annually. This is recommended not only for health purposes but to also protect your water heater and plumbing fixtures from the damaging effects of low pH (acidic water) and hard water (calcium deposits.)