You would be better to rewrite the query as:
SELECT payments.*
FROM customers
JOIN payments
ON payments.id_customer = customers.id
WHERE customers.id_project = 5
While this seems less concise and a good query planner will see what you are trying to do and run your correlated sub-query as the above join instead, a bad query planner may end up doing an index scan of payments.id_customer (assuming you have a relevant index) (or worse, table scanning) instead of doing things the more efficient way. Even a good query planner may fail to see the optimisation if the arrangement of this query is wrapped in something more complicated. Expressing the relationship as a join rather than a sub-query may make more difference than changing your data structure.
As Jeff says, any denormalising should be considered with care - it can bring easy performance boosts, particularly for some reporting purposes, but can lead to inconsistency due to bugs in the supporting business logic.
As a side note: Obviously I don't know your business so I could be missing something, but your table relationships seem odd to me. They imply that you can never have more than one project with the same customer which is usually not true in my experience, at least over a long period.
customer project payment
-------- -------- -------
pa_id
pr_id <-- payment
cu_id <-- customer
or if being less normalised (though I doubt that would be necessary):
customer project payment
-------- -------- --------
pa_id
pr_id <-- payment
cu_id <-- customer
`------------- customer
Of course that still discounts the possibility of a joint project with two customers...