Peko peko (ぺこぺこ) means very hungry: おなかが ぺこぺこです is “I'm starving”.
Press an empty drink can and it dents in with a little pop. Japanese hears that as ぺこ. Now imagine your stomach doing the same thing at four in the afternoon.
What it means
ぺこぺこ describes something thin and hollow caving in. Said about your stomach, it means you are very hungry — not “I could eat”, but “I'm starving”.
How to use it
This one takes です, not します: おなかが ぺこぺこです. It describes the state your stomach is in, like an adjective. With friends you can drop everything else and just say おなか ぺこぺこ!

ふじさん、おなかが ぺこぺこです…。
Fuji, I'm starving...

じゃあ、ラーメンを たべませんか。
Then shall we get some ramen?

いいですね! いきましょう!
Sounds great! Let's go!
A second meaning
With します it becomes something else: ぺこぺこします is to bow again and again, the way someone does when they are apologising or trying very hard to please. A single quick bow is ぺこり.
Close cousins
ぐうぐう is the growl an empty stomach makes: おなかが ぐうぐう なります. からから is the same idea for thirst: のどが からからです, “my throat is bone dry”. And when you have finally eaten too much, おなかが ぱんぱんです: “I'm stuffed”.
In manga and anime
A hungry character usually gets the growl, a long ぐうう drawn across the panel, and then says ぺこぺこ out loud. When you see ペコペコ written beside someone, they are more likely to be bowing than hungry.
Can you use it?
Yes, with friends and family. It is casual and a little cute. With a teacher or a boss, the plain おなかが すきました (“I'm hungry”) is the safer choice.