Like with colonization of most of the world, part of it of it was trial and error. The colonists might see, a berry or mushroom, eat it, then get sick/die later, telling the other colonists that it wasn't safe to eat. The Native Americans, however also played a massive role in telling the colonists what they could and couldn't eat. By communicating with the natives, the colonists were able to find out even more about what was edible, even just by observing what the natives ate.