Before the 2003-2004 season, NHL teams usually wore their white jerseys at home and the colored jerseys on the road. Since 2003-2004, teams switched the two, and now wear colors at home and white on the road.
Of course, there are the occasional exceptions to this. For example, if team A wants to introduce a third jersey at a home game, they may ask visiting team B to wear their colors. If team B then has another road game before returning home, they may ask team C, who they play next, to switch jerseys as well so that they only have to bring one set of jerseys (in this case, their "home" or colored jersey) with them on the plane.
The reasoning is simple; if everyone follows the same rule, then teams on road trips only have to pack one type of jersey. (Which may not seem like much, but teams carry multiples of every players jersey in case of damage)
Also, if teams wear their colors at home, then the format for home games is always "my teams colors versus white." When they wore white at home, the format was "my teams white versus random color of visiting team."