We prove that the congruence lattice of a nilsemigroup is modular if and only if the width of the semigroup, as a poset, is at most two, and distributive if and only if its width is one. In the latter case, such semigroups therefore coincide with the nil Δ \u3eΔ Δ -semigroups. It is further shown that if a finitely generated nilsemigroup has modular congruence lattice, then the semigroup is finite