Vetting is the process of performing a background check on someone before offering them employment, conferring an award, or doing fact-checking prior to making any decision. In addition, in intelligence gathering, assets are vetted to determine their usefulness.
To vet was originally a horse-racing term, referring to the requirement that a horse be checked for health and soundness by a veterinarian before being allowed to race. Thus, it has taken the general meaning "to check".
It is a figurative contraction of veterinarian, which originated in the mid-17th century. The colloquial abbreviation dates to the 1860s; the verb form of the word, meaning "to treat an animal", came a few decades later--according to the Oxford English Dictionary, the earliest known usage is 1891--and was applied primarily in a horse-racing context ("He vetted the stallion before the race", "You should vet that horse before he races", etc.).
By the early 1900s, vet had begun to be used as a synonym for evaluate, especially in the context of searching for flaws. 
Politicians are often thoroughly vetted. For example, in the United States, a party's presidential nominee must choose a vice presidential candidate to accompany them on the ticket. Prospective vice presidential candidates must undergo thorough evaluation by a team of advisers acting on behalf of the nominee. In later stages of the vetting process, the team will examine such items as a prospective vice presidential candidate's finances, personal conduct, and previous coverage in the media. The hurried vetting that preceded the selection by Republican nominee John McCain of his running mate Sarah Palin in 2008 was seen by many political observers as a mistake.
Vetting is also a term used in the field of transitional justice. When countries undergo a process of transition--after a period of armed conflict or authoritarian rule--they must determine what to do with public employees who perpetrated human rights abuses. They also must examine and revise the institutional structures that allowed such abuses to occur. Vetting is the set of processes for assessing the integrity of individuals (such as their adherence to relevant human rights standards) in order to determine their suitability for public employment. Countries transitioning to democracy and peace often utilize such processes to ensure that abusive or incompetent public employees are excluded from future public service.