When buying a home with a well (as opposed to public water) you will need to get a standard water test.
Depending on your area there are a couple ways this can be accomplished:
1. Your home inspection may be able to add this test in.
2. Your local health department may be able to test this for you. They will give you a kit that you will use in order to collect a sample from your faucet and bring to them for testing.
This is a simple test for bacteria in your water to make sure they are at an acceptable level for drinking.
If the water tests positive for bacteria, a bleach cleanse of the well will usually clear up any issues.