Biracks and biquandles, which are useful for studying the knot theory, are special families of solutions of the set-theoretic Yang–Baxter equation. A homology theory for the set-theoretic Yang–Baxter equation was developed by Carter et al. in order to construct knot invariants. In this paper, we construct a normalized (co)homology theory of a set-theoretic solution of the Yang–Baxter equation. We obtain some concrete examples of nontrivial n-cocycles for Alexander biquandles. For a biquandle X, its geometric realization BX is discussed, which has the potential to build invariants of links and knotted surfaces. In particular, we demonstrate that the second homotopy group of BX is finitely generated if the biquandle X is finite.