Start with whatever and tune it.
That's how chess engine programming works - you start with some number, and then tune it. For example you start with -5, then create another version with -10. You get the two engines to play against each other, and the one that wins more often is the "correct" version that you keep.
Of course as pointed out by other answers, doubled pawns aren't necessarily bad, so the next step is to start incorporating more features that can mitigate the doubled pawn penalty. For example you could say that if you have a pawn on an adjacent file that is defending the more advanced doubled pawn (e.g., a pawn on f3 given doubled pawns on e4 and e3), then remove the doubled pawn penalty. And then the testing process would start again, you take this patch and create a new fork, then get the two versions to play each other and retain the stronger version. And then you could tune, e.g. maybe "remove the doubled pawn penalty" is too strong, perhaps it should be "take only half the doubled pawn penalty", etc.
On another note, there is no "standard answer" to how large the doubled pawn penalty should be. Different engines will prefer different values - it depends on the rest of your evaluation function & search function. See this article which contains a paragraph about adding tripled pawn penalties to Ethereal:
You might ask- why can't someone just write a better evaluation function? The answer is that people are trying, but it's difficult. Andrew Grant told me that he tried to add a penalty for tripled pawns (because they're obviously terrible!), but for whatever reason the engine became weaker with that penalty. Code for positional subtleties is extremely unlikely to add strength.