It was gratifying to learn recently that a Federal District Court upheld a village ordinance in Morton Grove, Ill., banning the possession of handguns. Now that we've read Judge Bernard Decker's opinion, we are even more encouraged. The case marks an important advance for the cause of handgun control.

Morton Grove outlawed the possession only of handguns, and only by people who cannot show a legitimate need for them. Residents may own guns for target shooting, if they are stored at a gun club.

Opponents of gun control, led by the National Rifle Association, took Morton Grove to court, claiming a violation of the Constitution's ''right to bear arms'' amendment and the Illinois Constitution's right to own guns ''subject only to the police power.''

That gave Judge Decker an unusual opportunity, since ''no other court has been called upon to consider a handgun ordinance of this scope.'' He ruled that Morton Grove's concern for peace and safety was indeed a reasonable exercise of police power. He found the ordinance anything but arbitrary, since it distinguishes between long guns and handguns, permits guns to those with legitimate need and makes provision for hunters and target shooters.