One way to start is to think about what your robot does and figure out what the various outputs (motors, servos, pneumatics, etc.) and inputs you have. From there, build a list of things which you want to do code-wise, and put it in order of priority. For instance, our team this year might have a list which looks something like:
- Drive
- Automatically track goal using turret
- Auto-range finding
- Autonomous
After you have a list which includes the major things you plan on doing, break the highest priority one down into smaller, easier to manage parts and implement those in order. Going off of my example, here's what you might have for "Drive:"
- Simple 1-to-1 joystick-to-drive train mapping
- Encoder tracking
- PID controller
Once you get basic driving working, you can begin to move on to something which may be less critical, but still important. If you have multiple people, you can multitask, by having one person work on one subsystem, someone else on another, etc.
Basically, the easiest way to approach writing code for your robot (or any computer), is to break it down into easily manageable pieces which you stick together to make your more complex system.