Definition1: An element $a$ of an integral domain $R$ is irreducible if it is not a unit and if $a=bc$ implies that $b$ is a unit or $c$ is a unit.
Definition2: An element $a$ of an integral domain $R$ is irreducible if ideal $\left(a\right)$ is maximal among the proper principal ideals, i.e. if $\left(a\right)\subseteq\left(b\right)$ implies that $\left(b\right)=\left(a\right)$ or $\left(b\right)=\left(1\right)$. (originally the word proper was forgotten by me)
Question:
Which one to choose?
I thought they were both the same until I discovered that according to the second definition $0$ is irreducible in the special case that $R$ is a field. According to the first definition $0$ is not irreducible. This because $0=bc$ is true for the non-units $b=c=0$.
When studying factorization theory in domains, one is usually not interested in the trivial factorizations of $\,0,\,$ so one employs a definition of irreducible that proves most convenient for theorems about factorizations of other (nonzero) elements. So, to avoid exceptional cases, and to avoid having to frequently write "nonzero irreducible", it is convenient to exclude $\,0\,$ from the set of irreducible elements. Your first definition does this. It is probably an oversight the the second definition does not also exclude $\,0\,$ (probably "maximal among proper principal ideals" was intended - as is often written).
In contrast, when studying factorization theory in commutative rings with zero-divisors, the factorizations of $\,0\,$ are less trivial, yielding information about the zero-divisors, so they may prove of interest. So here one has to be more careful about formulating a good definition of irreducible. For example, see the definition of associate and irreducible in the paper below, where it turns out that, for all $3$ notions of "irreducible" (based on $3$ notions of "associate"), one has $\,0\,$ is irreducible iff the ring is a domain (see the paragraph following Definition $2.4).$
Factorization in Commutative Rings with Zero-divisors.
D.D. Anderson, Silvia Valdes-Leon.
Rocky Mountain J. Math. Volume 28, Number 2 (1996), 439-480