When the practice was eventually discontinued after the report by the Modernisation Select Committee in 1998 mentioned in Rick Smith's answer, there was resistance to the change because the opera hat distinguished the member wishing to make a point of order amidst the bustle of a division. See Hansard:
Mrs. Taylor: We recommend a new procedure for raising points of order during a Division. At present, we have the opera hat, and,
although some Members may feel that they look particularly fetching in
it, it makes the House of Commons look ridiculous when someone wearing
the hat is trying to raise a point of order from a seated position
while everyone else is milling around and going to vote.
Mr. Desmond Swayne: The point is that everyone is milling around. If we must get rid of the opera hat, there must be
some means by which a Member can indicate in the melee that he or she
wishes to make a point of order.
Mrs. Taylor: We dealt with that point in the report by suggesting that Members, having indicated to the Clerk or the Chair that they
wish to make a point of order, should be able to do so. We suggest
that a Member should do so from a position on the second Bench, as
close as possible to the Chair and the Clerks' Table so that he or she
can be heard by the Chair and by the Official Report without
obstructing the movement of Members to the Lobby. I understand that
the hon. Gentleman wants to be sure that Members will still be able,
in rare circumstances, to make points of order, but we have offered an
alternative that might be used.
Mr. Bennett: I accept that it is difficult to make a point of order during a Division. When we put the hat on, most of the rest of
the House is amused by our appearance. However, although having a
special place to stand is perfectly all right for the person making
the point of order, it often happens that once a Member has made a
point claiming that something is absolutely outrageous, another Member
wants to rebut it quickly. If one is standing in the far corner, it
will not be easy, after hearing a point of order, to rush to the
second Bench to make a point.
Mrs. Taylor: It is not for other Members to rebut points of order, but for the Speaker.
While this excerpt suggests that when the practice was discontinued, the hat was helpful for indicating that the MP wished to make a point of order, it seems unlikely that this was the original reason; as when the practice was instituted it would have been the norm for all members to wear hats while seated in the chamber. I believe the practice originated from the idea that during a division, the House is not in the process of a debate as such, and so the usual courtesy (which evolved into a requirement) of standing and removing one's hat to speak was not strictly necessary. See, for example, the ninth edition of Erskine May, available on archive.org:
In both houses, proper respect is paid to the assembly, by every member who speaks rising in his place, and standing uncovered. The only exception to the rule is in cases of sickness or infirmity, when the indulgence of a seat is frequently allowed, at the suggestion of a member, and with the general acquiescence of the house. In both houses, also, during a division, with closed doors, it is the practice for members to speak sitting and covered; but this practice is confined to questions of order, arising out of the division, and does not apply to distinct motions proposed for the adoption of the house.