Purchase a hinge with one wing at least 3 inches by 3 inches.
Drill a hole in the larger wing big enough through which to slide the handle of the broom, 3/4 inch to 1 inch depending on the size of the broom. Use a titanium or cobalt drill bit if your hinge is made of a hard metal such as steel.
Screw the hinge into the wall. Hold the smaller wing against the wall so the larger wing folds out perpendicular to the wall. Drill screws through the holes into the wall to secure the hinge.
Place the broom into the hole in the larger wing of the hinge that is sticking out from the wall. The weight of the broom and the pressure of the wall will keep it secured for storage.