According to Wikipedia, the first peak of the temperature power spectrum of CMB determines the curvature of the Universe. And this answer by @pela says that the first peak is consistent with a flat Universe. So my questions are how/why does the first peak tell us the curvature?
Spatial curvature actually shifts all of the peaks right or left. It does so because it bends the light rays traveling across the universe to us from the surface of last scattering.
If the universe has positive curvature, light rays from opposite sides of a “hot spot” bend toward each other, making the spot appear larger to us than would appear in a universe with zero curvature. If the universe has negative curvature, light rays from opposite sides of a hot spot bend away from each other, making the spot appear smaller.
This curvature-induced magnification or demagnification applies to hot spots of all sizes and therefore shifts all of the peaks.
The fact that the first peak is expected near $l=200$ if the curvature is zero comes from a calculation of the size of the horizon at recombination. One finds that the horizon at that time has an angular size of about 0.9 degrees of arc in the sky today, corresponding to $l=180/0.9=200$.
See http://background.uchicago.edu/~whu/intermediate/clcurvature.html and http://folk.uio.no/hke/AST5220/v11/AST5220_2_2011.pdf, both of which are credible sources.