  To any semigroup presentation $\mathcal{P}= \langle \Sigma \mid \mathcal{R}
\rangle$ and base word $w \in \Sigma^+$ may be associated a nonpositively
curved cube complex $S(\mathcal{P},w)$, called a Squier complex, whose
underlying graph consists of the words of $\Sigma^+$ equal to $w$ modulo
$\mathcal{P}$ where two such words are linked by an edge when one can be
transformed into the other by applying a relation of $\mathcal{R}$. A group is
a diagram group if it is the fundamental group of a Squier complex. In this
paper, we describe hyperplanes in these cube complexes. As a first application,
we determine exactly when $S(\mathcal{P},w)$ is a special cube complex, as
defined by Haglund and Wise, so that the associated diagram group embeds into a
right-angled Artin group. A particular feature of Squier complexes is that the
intersections of hyperplanes are "ordered" by a relation $\prec$. As a strong
consequence on the geometry of $S(\mathcal{P},w)$, we deduce, in finite
dimensions, that its univeral cover isometrically embedds into a product of
finitely-many trees with respect to the combinatorial metrics; in particular,
we notice that (often) this allows to embed quasi-isometrically the associated
diagram group into a product of finitely-many trees. Finally, we exhibit a
class of hyperplanes inducing a decomposition of $S(\mathcal{P},w)$ as a graph
of spaces, and a fortiori a decomposition of the associated diagram group as a
graph of groups, giving a new method to compute presentations of diagram
groups. As an application, we associate a semigroup presentation
$\mathcal{P}(\Gamma)$ to any finite interval graph $\Gamma$, and we prove that
the diagram group associated to $\mathcal{P}(\Gamma)$ (for a given base word)
is isomorphic to the right-angled Artin group $A(\overline{\Gamma})$.
