Although it may be tempting to cut corners with a prototype, it's better to over-engineer from the start rather than attempt remediation when the system does not work properly or is unreliable.
Don't think of ground as a sewer into which electrons get dumped. Rather, consider each electrical sub-system as needing a “return path” for its outgoing signal. Some return paths may need to be joined together (for example, at the battery's negative terminal).
One of the biggest problems in low-level (small voltage) wiring is that of ground loops. A ground loop exists when there is more than one path for a signal to return to its source. Usually these multiple paths are physically separated. The greater the distance, the bigger the loop — and the more electrical noise can intrude.
A real-world example of a ground loop is having a thermocouple in direct contact with a grounded metal engine part. In this case, an isolated thermocouple could be used, but realize that it will introduce a lag in response time because heat must cross the isolation/insulation material.
Sometimes it's not obvious that you have created a ground loop. Having a drawing of the entire wiring system is therefore very useful.
It's imperative to keep high-level signals away from low-level signals. The spark-plug end of an ignition system is an example of a high-level signal. However, the pickup end of that same ignition system is a low-level signal.
You never want to run high-level and low-level signals in a bundle where they would lay parallel to one another. If high- and low-level signals must run side by side — minimize the length of the run. Where high- and low-level signal wires cross, it's best they do so at a right angle.
Generally, keep cables carrying “power” away from cables carrying “signals”.
However, there are different types of power-carrying cables. You can be pretty careless with the routing of “static” power cables like the wiring for a headlight. The rate of current change in headlight wiring is essentially zero. But when the current's rate of change increases, more care must be taken. Something like a battery-powered CDI is at the opposite extreme. The amount of current it draws changes with RPM, but it changes even faster (rising and falling) between individual sparks.
Two-strokes almost always use Capacitor Discharge Ignitions. These produce much faster spark rise times than conventional induction ignition systems (mostly what is used on 4-strokes). So, CDIs require more care in wiring than conventional ignitions.
Resistance in spark plugs or plug wires will lessen interference because it reduces the rise-time of the spark. Any signal that has a “fast” rise time will produce interference over a wide range of frequencies.
The impedance of the wire itself may be important. Impedance is to a varying signal (for example, an ignition pickup) what resistance is to a steady signal (for example, a headlight). A single solid wire may have the same resistance as a multi-stranded cable, but the solid conductor's impedance will be higher.
When using a shielded (aka screened) cable, ground the shield at one end only — typically the shield at the sensor end is left open.
Metal boxes are better than plastic for keeping signals electrically clean. Metallized plastic is often used in cost-sensitive applications.
The best way to convey sensitive signals (e.g., ignition pickup sensor) from one place to another is with a twisted pair of wires (the signal itself and its return wire). Likewise, conveying a signal that can generate a lot of noise (e.g., a fuel injector that generates switching transients) can also benefit from twisted-pair wiring.
Above (brown and green) example of a twisted pair of wires
Below (yellow) example of a single excess wire folded back on itself to minimize loop area
The best solution is not to have it in the first place by making wiring as short and direct as practical. But this is not always the right thing to do at the outset, especially if there are still a lot of question marks in the overall system design.
The next best thing to do with excess wire is to fold the overage back on itself and then twist the wire together as you would with safety wire pliers. This creates a similar effect to “twisted pair” mentioned earlier, and is the least susceptible to noise.
The worst thing to do, and what happens frequently, is to coil the excess wire into a nice tidy loop. Not only does this increase wiring inductance, it makes a great antenna that can transmit and/or receive electrical noise.