more specifically, prodigal/prodigy/prodigious come from latin prodigo, meaning in a good sense to "use up, consume," and in a bad sense to "squander lavish, waste." Prodigo itself comes from pro + ago (ago, takes egi in the perfect, from which you get the -ig- in prodigious. The past perfect participle of the verb ago is actus, where we get "act," "redact," etc,) ago means "to do" or "make" in various ways and pro is a prefix meaning a lot of stuff including "for," denotes forward direction, action directed forward, bringing forth, etc. So pro + ago, where we get all these terms, generally means in its constituent parts "to act/do/make/put things forward" which contains the more distinct meanings of prodigy (something exemplary put before you), prodigious (something remarkably great before you), and prodigal (wastefully puts things before them).
Both prodigy and prodigious come from prodigium, which is a religious/cultic term meaning "a prophetic sign, token, omen, portent." It could also be something monstrous or awesome—in the biblical sense.