The phrase suggests the speaker is guessing and is unsure about the exact details. He plucked an excuse out of the air to avoid going to the party.
Pro Tip 2/3
Spontaneity
Use it when someone makes a spontaneous or sudden decision without much thought. She plucked a destination out of the air for her random weekend getaway.
Pro Tip 3/3
Lack of Evidence
It implies that there isn't substantial evidence or reasoning supporting the statement. The accused plucked an alibi out of the air, which didn't hold up in court.