The answer is in the Code of Canon Law. Canon 874 tells us that a sponsor should be (1) at least 16, unless the bishop or pastor makes an exception; (2) a practicing Catholic who has already been confirmed and made his first Communion; (3) free of any canonical penalty; and (4) neither the father nor mother of the person to be baptized.
The same criteria apply for confirmation sponsors. In my opinion, the most important criterion is that the sponsor be a good practicing Catholic.