Potatoes can be a mystery when it comes to trying to figure out when it's time to harvest. All of the important development seems to happen underground. So how can you tell when it's time to harvest?
To harvest new potatoes: New potatoes are small, tender potatoes that are harvested and eaten right away. They do not store well. Harvest new potatoes when the plants are finished flowering by digging around the edges of the plant with a garden fork (you're less likely to cut the tubers with a garden fork than you are with a shovel.)
To harvest large potatoes for storing: Let the plant continue growing after it is done blooming. Keep hilling up the soil or mulch around the plants so that the tubers aren't exposed to sunlight. Once the foliage has all died back, dig up your tubers. Don't wash them off. Let them sit out in a single layer for a couple of days, and then brush off any dry soil, and store.