The spell glyph says it can only affect spells that can affect one or more targets or an area. It also provides explanation for how it works with summoning and 'dangerous object' making spells. As far as I can tell, summoning spells don't generally affect a target (unless the summon counts? That would require target to mean different things in different parts of the spell text) or an area (summon swarm being a notable exception) and the kind of spells I'd want to use to make 'traps' don't either. How does this work?
As far as I can tell, there aren't currently any spells that would be affected by this clause in Glyph of Warding. It's likely that this caveat is in the spell description purely as a precaution, as explained by SevenSidedDie.
However, there is at least one spell that targets a single creature but can also potentially create a creature: Finger of Death. It isn't affected by this clause because it only creates a creature if it kills its single target, but it at least creates a precedent for spells that create or summon creatures as side effects of a spell with the required targeting.
For that matter, there are a lot of spells that blur the distinction between "targeting an area" and "creating a harmful object". For example, Evard's Black Tentacles affects an area, but it creates a harmful object (well, lots of them). A case could be made that all it's doing is creating the tentacles, and the area affected isn't the "target", or that the area is the target and the tentacles are just the effect on the target.
Note: the next section is purely my opinion. Feel free to ignore it completely.
I suspect the intent behind this is also meant to allow for spells like Spiritual Weapon, Mordenkainen's Sword, and possibly even Bigby's Hand that create a single-target-attacking object. By strict RAW, you probably can't actually do this, though.
They're just covering their bases for all circumstances that might come up, within the existing list of spells or homebrew.
The requirement is hard and clear: to store a spell in a spell glyph,
The spell must target a single creature or an area.
If you can find a spell that does that, you're in the clear.
The passage that talks about summons or dangerous objects simply establishes that, if the spell creates hazardous conditions, they're centred on the triggering creature rather than their location being left undefined or up to the DM.