To support the answer by @Joshua, Wikipedia says:
Beersheba is mainly dealt with in the Hebrew Bible in connection with the Patriarchs Abraham and Isaac, who both dig a well and close peace treaties with King Abimelech of Gerar at the site. Hence it receives its name twice, first after Abraham's dealings with Abimelech (Genesis 21:22-34), and again from Isaac who closes his own covenant with Abimelech of Gerar and whose servants also dig a well there (Genesis 26:23-33). The place is thus connected to two of the three Wife–sister narratives in the Book of Genesis.
In particular, the Genesis 21:31 literally says:
Therefore that place was called Beer-sheba;
This should be read more correctly as "Therefore this place is called the well of covenant " (Mistranslating sheva of Beer Sheva as seven rather than as covenant is rather common.)
Further remarks:
- Whether Abraham is a real or a mythical character is of little importance here, since the Hebrew bible was written well after the events. On linguistic evidence, its earlier chapters (including Genesis) date back to the first millennium B.C.
- It is difficult to attest whether the place mentioned in the bible is the same as the one called Beer Sheva today. The ancient site of Tel Sheva is located beyond the city line, whereas the site called "Abraham's well" in the old city is certainly a much later creation.