- The competition was good for David and bad for Peter.
- The competition was good for David and was bad for Peter.
- The competition was good for David and it was bad for Peter.
Are any of these sentences incorrect?
They are all grammatical.
We can even leave out more:
The competition was good for David, bad for Peter.
is also ok.
If you mean that David did well in the competition and Peter did badly, it might be better to say:
The competition went well for David, and ((it) went) poorly/bad/badly for Peter.
If we use good, it could also mean that it was good for David like broccoli is good for you, and then likely that it was bad for Peter, as in it hurt or damaged Peter.
To explain this further, we understand that sometimes people can lose or do badly at something, but the experience can still be good for them. An example would be that if a child loses at a game, the experience can be helpful for them in some way: it could help build their character, perhaps.
If it's part of a larger conversation, however, the meaning of what you're saying would be clear if you use your example sentences.
In writing, many people would prefer went badly for instead of went bad for. In informal conversation though, went bad for would be acceptable to most.
Ellipsis, leaving out parts of a sentence that would otherwise be required, is a very complex aspect of grammar. You can get a sense of this by looking at some of the types of ellipsis listed here.