The group is based on the French novel The Three Musketeers by Alexandre Dumas, père. Cobalion represents Athos, the oldest and de facto leader of the group. Terrakion represents Porthos, the strongest, heaviest, and largest member of the group. Virizion represents Aramis, the most feminine, vain, and romantic member of the group. Keldeo represents d'Artagnan, the youngest by far and the latest addition to the group.
Cobalion and Cobalon are a combination of cobalt—both the metal and the color—and lion.
Terrakion's name may derive from terracotta, a clay-based material, as well as its respective color. It may also come from terra, latin for earth.
Virizion's name may derive from viridian, a bluish-green color. It might also derive from "viridarium", a Latin term for a garden.
Keldeo's name is probably derived from kelda, which means "spring" in Old Norse, or kelpie, a water horse from Celtic folklore and the word rodeo, a sport involving skills with horses, cows and other livestock.
-From Bulbapedia