I have got funnel chest (pectus excavatum); how bad it has to be to have surgery?

Depends. At your age, it's unusual to have it corrected. Most are repaired around age 5. Most are done for cosmetic reasons. However, significant pectus defects can limit exercise due to compression of the right ventricle and limits on the heart's ability to increase output during exertion. A test called vo2 max can sort that out.
For cusmatic. Statistics are inconclusive for physiological improvement of surgical repair in pectus excavatum. So remains mainly as cusmatic purpose. Shahzeidi, md.