Yes, if it's a Bard spell.
For Bards, learned spells are prepared spells, according to the general rule for Spells Known and Prepared:
Before a spellcaster can use a spell, he or she must have the spell firmly fixed in mind, or must have access to the spell in a magic item. Members of a few classes, including bards and sorcerers, have a limited list of spells they know that are always fixed in mind. [...] Other spellcasters, such as clerics and wizards, undergo a process of preparing spells.
The act of preparing a spell what a caster needs to do to "fix it firmly in mind." Bards do this automatically for all their Bard spells. The preparation requirement for Glyph of Warding is shorthand for "have the spell fixed firmly in the caster's mind."
A Bard may use a Bard spell with the Glyph of Warding because, for a Bard, all Bard spells are at the ready in this way. However, if the Bard multiclasses into a spellcasting class that requires spell preparation, the spells that are unique to that class would need to be prepared before they can be used with the Glyph of Warding.