National Electrical Code 2014
Article 250 Grounding and Bonding
II. System Grounding
250.24 Grounding Service-Supplied Alternating-Current Systems.
(A) System Grounding Connections. A premises wiring system supplied by a grounded ac service shall have a grounding electrode conductor connected to the grounded service conductor, at each service, in accordance with 250.24(A)(1) through (A)(5).
(1) General. The grounding electrode conductor connection shall be made at any accessible point from the load end of the overhead service conductors, service drop, underground service conductors, or service lateral to and including the terminal or bus to which the grounded service conductor is connected at the service disconnecting means.
This means that the grounded (neutral) from the service must be connected to ground, and that the connection can be made by bonding the neutral bus bar to the grounding electrode.
(5) Load-Side Grounding Connections. A grounded conductor shall not be connected to normally non–current carrying metal parts of equipment, to equipment grounding conductor(s), or be reconnected to ground on the load side of the service disconnecting means except as otherwise permitted in this article.
This means that the grounded (neutral) conductors should only be grounded at the main service disconnnect.
If the main service panel happens to be the same place that the grounded (neutral) conductor is bonded to the grounding electrode, then there is no problem mixing grounds and neutrals on the same bus bar (as long as there is an appropriate number of conductors terminated under each lug). If the two bus bars are not connected; as would be the case anywhere other than the main disconnect (exceptions exist), then you cannot mix them.
Notice how the grounded, and grounding bus bars are connected in the main service panel. This means that; electrically speaking, they can be considered a single bus bar. Which means that both grounded (neutral), and equipment grounding conductors can be terminated on either bus bar.
In the subpanel, the bus bars are kept separate. So grounded (neutral), and equipment grounding conductors cannot be mixed.
If the #14 or #12 wire is a branch going to specific loads, then it is "safe" with respect to that load. It won't overload that wiring regardless of the breaker capacity use (or even if the breaker is bypassed entirely). However, this is unsafe in the context of changes in usage. The electrical code focuses on safety and rightly prohibits this. The circuit breaker is required to be sized to protect all wiring in the branch circuit it feeds to (and the receptacles, too). This is because someone could overload the circuit (for example plugging in a 12 amp appliance in one outlet and another 12 amp appliance in another outlet on the same circuit, which should trip a 20 amp breaker and would not trip a 30 amp breaker).
In USA, all 15 amp receptacles are actually rated at 20 amps (just not configured to accept a 20 amp plug). So if you have 20 amp wire (usually #12 if the special cases requiring derating do not come into play), you can use a 20 amp breaker (one more exception in the code is if the branch circuit has a single dedicated outlet, it must be protected at the outlet designated amperage).
Since the normal type of outlets don't have a 30 amp capacity, you can't use a 30 amp breaker on them even if you have 30 amp wiring (usually #10), and meet the electrical code. The receptacles can overheat, too. You may need to split circuits if this branch is pulling too much current.
Best Answer
It is generally NOT okay to have a 20A circuit breaker on a circuit that has any 14 gauge wire -- and most homeowners won't run into the exceptions
If there's any #14 wire anywhere downstream, you must use a 15A breaker to protect that wire. It's about fire prevention. #14 wire is rated for 15A. Sure, it will carry more, but the N.E.C. ampacity ratings take into account the resistance of the wire insulation to heat and other factors. Bottom line, #14 wire equals 15A breaker.
It's fine (or even required) to oversize the conductors, but not to oversize the breaker (except under rare circumstances that you'll never need to know about unless you become a licensed electrician or wind up doing funny things with motors that invoke Article 430). #12 wire on a 15A breaker is fine. The wire is protected. For longer runs, for example using #12 wire on a 15A breaker or #10 wire on a 20A breaker will reduce voltage drop. There are calculations for wire size related to voltage drop over distance that tell you when you need bigger conductors.
Why was this done?
Hazarding a guess, the person who did it might have had some #14 Romex lying around the garage. Maybe they didn't want to run out and buy some #12, or felt they couldn't afford it. Maybe they bought #14 on purpose just because it was cheaper and they didn't understand the requirements. Or maybe they reasoned that it was okay since the only load on those #14 wires would be the lights, which would never draw more than about an Amp per fixture. That's true enough, technically speaking, as long as nothing ever goes wrong, but it still illegal (actually illegal, because it violates the N.E.C. rules).
But stuff does go wrong, so you never intentionally create a situation that has the potential to start fires or electrocute people.
A few (far from exhaustive) examples of things that could go wrong include; somebody comes along and replaces one of those fixtures with a bigger fixture, or with one of those fixtures with a receptacle on it, or adds a convenient receptacle elsewhere on the 14 gauge stretch of the same circuit, or both. Or something goes wrong with one of the light fixtures that causes it to steadily draw more current than it was meant to, and all of a sudden you have a circuit breaker that will happily feed 20A onto #14 wire for long periods of time.