Since hamsters are also rodents, they will eat whatever they found --- especially when it comes to sweets --- without deep thought. They even don't think if the food is harmful or not.
If you feed your hamsters whatever they eat, it will make your hamsters over weighted, sometimes make them sick.
You should also keep your eyes on their instinct that hide their goodies in the nest. Some foods in their cache gone bad pretty quickly and create problems.
To be a good caretaker for your hamsters, you also need to be a good dietitian for your hamsters.

Hamsters like sunflower seeds, like every rodents do.
Sometimes seeds are considered as hamsters' major nutrition source, but it is not true.
In the wild environment, seeds are precious nutrition source, it is quite understandable that they are crazy for seeds. But for pet hamsters, Sunflower seeds or nuts are too fatty to eat everyday. If you keep sunflower seeds in your hamsters' cage, this makes your hamsters over weighted quite quickly. Over weight is bad for hamsters too. You should consider seeds as special treats. Daily maximum amount of seeds might be around 3 to 5 grains.
This method also helps to be a good friend for your hamster quickly. By hand feeding sunflower seeds, your hamster will acknowledge you as a friendly caretaker.

Instead of seeds or nuts, let's feed hamsters veggies such as cabbage or other leaves. They love it. Veggies don't make your hamsters over weighted,
you don't need to buy whole veggies only for hamsters, they don't eat much. You can spare some while preparing meal for your family. For instance, When you prepare cabbage salad, you can spare cabbage core for hamsters. (By the way, sources said lettuce may harm hamsters health. We are not sure it is true or not, you may want to avoid it.)
You should keep your eyes on your hamsters' instinct to hide foods in their nest. They store everything in their nest, but they don't do spring cleaning, they even don't know veggies go bad quite quickly. Keep your hamsters cage clean, remove old veggies from the cage regularly. Rotten veggies or mold may harm your hamsters.

Strong herbs, like garlic or celery may lethal for tiny hamsters. Even though herbs are good for human, those strong flavored leaves may harm hamsters health. Please avoid celery, garlic, or onions etc. Hamsters will eat whatever they get without thought, only you can protect them from food poisoning.
You should also be aware of salad pack (packaged salad sold at the supermarket etc). Those bagged salad may contain herbs even if the package says "Garden salad" You should feed hamsters from whole vegetables.
Other stimulants like chocolates also may harm hamsters health. Watch your kids not to feed their snacks to hamsters. It may end up with tragic results.

Rodents' teeth never stop growing. This is why they need to bite something hard all the time. For this reason, you need to give them something to bite. Veggies are too soft for this purpose, you may want to give them hard pellets or piece of wood.
Formulated foods are suitable for this purpose, please check your local pet store. Usually those hamsters foods are designed to be extremely hard to help shorten hamsters teeth. Piece of wood does the same work in terms of teeth care, but hamsters foods works as supplements also, it might be more enjoyable for your hamsters.
Sometimes those formulated foods don't meet your hamsters taste, so don't buy a big bag. Buy small portion first to see if your hamsters like those or not.

Hamsters like fruits too. You can feed small potion of your dessert like berries or wedges of apple to hamsters, they will be delighted. The basic rule is, mild fruits suitable for babies are also suitable for hamsters. You should avoid tropical fruits (papaya, mango etc). Even some people show allergic reaction for those strong fruits, those tropical fruits can be too strong for hamsters.
Fruits go bad quite quickly, you should keep your eyes on those fruits too. If it went bad or got mold, it may harmful not only for hamsters also for caretakers. When they left fruits, you should remove it from the cage after then.