No, there is not.
LEGO Star Wars II has a healthy list of cheats, but they unlock characters and small bonuses rather than skipping story chapters. Chapters are opened by playing through the preceding ones, and no code bypasses that.
The good news is that the game is short and forgiving, and free play mode gives you a reason to revisit levels you have already cleared rather than treating them as finished. If you want everything unlocked quickly, the practical approach is to keep a second player on the second controller — co-op makes the combat sections considerably faster.