Why can't mathematician agree on a definition!!!
and I think this question should be addressed. This answer is too long, but I think you have missed a major aspect of what mathematics is about.
Short version of this long answer:
The definitions all agree, but they are trying to model different aspects of the same idea.
A metric space is an abstraction of ordinary three-dimensional space, designed to emphasize certain aspects of geometry and analysis, so that we can understand them better.
A topological space is a different abstraction, designed to emphasize different aspects of geometry and analysis. It is more abstract and more general than a metric space, which means that there are more examples, but there is less that you can say about them.
Why have two definitions of “open set”? It is this: even before we invent metric spaces or topological spaces, we have an idea of an open set:
geometrically, it is a region with no boundary; analytically, it is a kind of region for which a convergent sequence outside the set never converges to a point in the set. These are aspects of geometry and analysis that we would like to understand better, and metric spaces and topological spaces are invented for the purpose of understanding these ideas better, by abstracting away unnecessary details, and by focusing on what seems most important. Each kind of space is a context in which certain details are abstracted away and other details are brought into focus.
The point of the topological definition is to show that a topological space is a good context for understanding open sets. Open sets have many interesting properties: among them, that unions of open sets are open, but infinite intersections may not be. A topological space focuses on this aspect of open sets, and allows us to understand what these properties imply, without being distracted by other details.
The point of the metric space definition is to show that a metric space is a good context for understanding open sets. Open sets have many interesting properties: among them, that for each point $x$ of the set, any other point must also be in the set if it is close enough to $x$. A metric space focuses on this aspect of open sets, and allows us to understand what these properties imply, without being distracted by other details.
There is a theorem, early on, that proves that there is a certain way to understand any metric space as being an example of a topological space, and that if construed in this way, the metric space models open sets in the same way that the topological space does—the two notions of open sets agree about which sets are open. There is no conflict between the two definitions, only that the metric idea is more detailed and specific than the topological idea. (And so there are fewer examples, and it applies to fewer situations.)
You mentioned a third way, which is even more detailed and specific: open sets are certain subsets of the real line. Again, the idea we are trying to model is the same: sets with no boundary, or sets for which a convergent sequence outside the set never converges to a point in the set—but this time restricted to subsets of the real line. And again, there is no conflict between this definition and the others, because there is a theorem that proves there is a certain way to understand the real line as being an example of a metric space, and that if construed in this way, the real line models open sets in the same way that the metric space does.
You asked which definition to use. It depends on the context. If you are trying to prove something about the behavior of open sets in a topological space, you must use the topological definition. it does not make sense to try to use the metric definition, because not every topological space has a sensible notion of distance. If you are trying to prove something about the behavior of open sets in a metric space, it is usually easiest to depend on the metric definition, but the theorem that shows that every metric space is also a topological space, with the same open sets, means that the topological definition is also available to you. If you are trying to prove something about open subsets of the real line, you have even more to work with. For example, you can use the fact that every open set is a finite or countable union of open intervals, which is not true in general metric spaces.
I hope this is some help, and I apologize for the length.