Whenever someone comes with a biblical passage as a piece of historical evidence, one of the two answers (and often both) are to be expected: one that Bible, as a religious book is worthless as a historical source, the other, that it is to be taken at face value. Both are wrong, the first one pretty much completely, the other one mostly.
As for the first: The Bible is not one book, but a collection of texts written and rewritten over more than a thousand years; some of them are obviously non-historical, some were written as historical. Their authors (like everyone) had their biases, their beliefs, their sympathies and this must be accounted for, but that doesn't mean their texts are worthless as historical sources. In fact, many of them are the best historical sources available for the respective periods and locations.
As for the second: Even the best source is to be taken critically, checked against other sources, general knowledge about the period and location, known biases and so on. This is history and not religion, so no source is inerrant, whatever anyone happens to believe.
A good general example here would be the so called Deuteronomistic history, that is the books of Joshua, Judges, Samuel and Kings. They are a very important source for our knowledge of the history of Ancient Israel, yet the author obviously and wholeheartedly supports King Josiah and his policies, and this bias informs his assessments of former rulers. It also appears that some of the history of the North (i.e. Israel) is being appropriated by the South (Judah) in these books.
The issue is more complex, as we start looking closer. For just one example, Goliath - presumably living in 10th century BC - is described as what fits a Greek mercenary of 7th century BC. Why? Is it simply because this story has been made up in the 7th century by someone in the service of Josiah or is there more to it again? (Spoiler: there's more to it.)
Note: this post is meant as an introduction to a series of posts describing in more detail if and how particular books (and parts thereof) may be used as historical evidence.