[Worms] are major decomposers of dead and decomposing organic matter, and derive their nutrition from the bacteria and fungi that grow upon these materials.
The earthworms are not nearly as interested in eating the organic matter as much as they are interested in potential microorganisms that they can consume alongside the organic matter. This is actually how they can tell what's edible and what's not - if it has started decomposing!
A confession - I really only like the fries at Chick-Fil-A because I usually load them up with Chick-Fil-A sauce. Though I am eating the fry and the sauce, I mostly do it for the sauce.
A confession from your worms - I really only like fruit/vegetable waste because it's usually loaded up with plenty of yummy microorganisms. Though I am eating this organic matter and the microbes on it, I mostly do it for the nutrition from the microbes.
And so your worms go forth in your bin, from a microbe's perspective, as an astronomically sized monster, consuming entire planets (considering how much bacteria can be on just a small piece of organic matter this is actually a pretty good analogy) whole.
Just some fun imagery.
So.. Are Worms Decomposers?
You could not possibly create a more advanced composting system than the earthworm. Worms obtain nutrients from the microbes as decomposition occurs, so their digestive system has completely optimized itself to be a decomposition super accelerator.
The material that enters the earthworm will quickly be covered by saliva which innoculates it with more microorganisms, then the material is crushed and ground - almost like a shredder - in the gizzard which massively increases the surface area of the food and allows for masses of microorganisms to populate the material where they couldn't have before. Then in the intestine it is further broken down and the worms obtain the nutrients they need before excreting the worm cast, which will explode with microbial growth due to the microbial innoculations and massively increased surface area. The whole process remains aerobic and produces beneficial bacteria while destroying pathogenic bacteria.
The material they eat becomes decomposed in only a few hours - as long as it takes for it to go from one end of the worm to the other.
Guidelines For Feeding Worms
Aerobic Conditions and Bedding
You need to make sure your bin stays aerobic. Organic matter that will contribute to aerobic conditions in any quantity is considered bedding. Other organic matter would be considered food. The majority of your bin (75% or more) should be bedding, or finished worm castings/compost, at any given time. This is very important. If you do not know the difference or if these do not seem like familiar terms, you need to learn more about bedding.
The entirety of the rest of this post will apply specifically to food such as fruit/vegetable waste; things that are higher in nitrogen and water content typically.
Avoid certain types of foods
Generally you'll want to pass on feeding citrus, meat, dairy, spicy foods, salty, greasy, or oily foods, because the worms don't handle them very well, and other organisms might take advantage of the available food. Check out the squirm firm infographic at the bottom for more details.
Bury the food
Worms feel safe below the surface, they don't want to have to come up out of the soil to eat if they don't have to. If there is any light getting into the bin at all it will further discourage them from leaving the soil to eat. Additionally, burying the food can help prevent the material from drying out if its left over the surface. If the worms are protected from light and the material won't dry out on top, you don't really need to bury the food - however it will help prevent any gnats/fruit flies from discovering the food if its buried as well.
Don't add throughout the entire bin
Until you are familiar with the type of food you are adding and how the worms/bin will respond, don't add the food throughout the entirety of the bin. This allows the worms, if they don't like the material/conditions you've created, to just go to a different section of the bin (whether horizontally or vertically). If it has been added throughout the entire bin and something has gone wrong, their only option is to escape the bin as a whole. It is a good idea while you are still learning to always leave a portion (a third or so) of the bin free of any actively decomposing food as a safe space for the worms if you make a mistake elsewhere in the bin.
This also allows you to figure out if a food/type of organic matter will be okay for your worms. You can ask your worms directly by adding some of the food in a small area in the bin. If they don't like it, worst case scenario is that they'll avoid that area and not touch the food. If they swarm it right away, they like it.
Although you don't need to do this, the worms will be able to eat a watermelon/grape/apple/any fruit with skin much faster if the skin has been punctured or they are able to access the "flesh" inside.
Man, that sounds morbid without context. But, when I feed my worms zucchini, for example, I don't just put it in whole. You'll want to expose the inside somehow. Breaking or cutting it in half, cracking it open, or cutting a chunk out of it will greatly decrease the time it takes the worms to eat all of it.
The more microbes and more microbial diversity, the better. The microbial population should establish itself after the first few weeks (and is really only a concern as you first start), but you can always improve it/add to it by adding little innoculums of healthy (KEY WORD) soil/organic matter from healthy soils. I often go to parks, forested areas, or healthy garden soils. Just take a small amount of material (half a cup) and toss it in the worm bin. Be aware that you're adding anything else that might be in that handful - like any bugs. This usually isn't a problem because if you're not fostering an environment where bugs will thrive then they will go away, but you might introduce some roly-polys, or springtails, or millipedes that will live alongside your worms in small amounts if your worm bin isn't totally unmanaged.
Make sure the moisture levels in the bin are good enough. Without water there is no life, and no life means no microorganisms (let alone worms) which means no decomposition. Of course as always you'll want to make sure its not too wet that it creates anaerobic environments though.
How much food to add at once - Overfeeding
There are a few things that limit how much food to add at once. You don't want to create anaerobic conditions from excess water, you don't want to start thermophilic (hot) composting, and you don't want to add so much food that the worms can't eat quick enough so other organisms start flourishing on the extra available food. Whenever you make one of these mistakes you can always remove the food you added to help resolve it, and if you are following the practice of only adding food in certain areas of the bin then its an easy fix. Read on to learn more about all of this.
Overfeeding and Excess Moisture
As you are adding water-rich foods, like fruit/vegetable waste, they will release their water into your bin as they decompose. If too much water is released it can waterlog the bin and create anaerobic conditions. You will eventually need to add more dry bedding to counteract the excess moisture if the bin starts to get too wet.
Overfeeding and Pests
Ideally worms will be the main macro-organism eating your food. However, if some food waste hasn't been eaten by the worms and there's plenty of excess food that other organisms don't have to try to outcompete the worms to eat, you may start to see mites, mold, or other unsightly (but usually not inherently bad) organisms start to feed on the material. The key is to just provide enough for the worms - as long as you make sure its worm-edible, nothing is going to be able to outcompete the worms. Burying the food of course will help with this.
Overfeeding and Thermophilic Composting
If you add too much food that is too high in nitrogen the rapid microbial growth can cause the material to heat up - which can kill your worms. Be aware of the general Carbon to Nitrogen ratio of the food you're adding. The higher the nitrogen content, the less of it can create heat. In situations where you are feeding them higher nitrogen material (such as coffee grounds with a 20:1), if you add it in small concentrations (only a small amount at a time/spread out more thinly) it will help prevent the heating up effect. Materials like fruit and vegetable waste are usually around 35-40:1 carbon to nitrogen and aren't so prone to heating up unless you have added a lot.If you are following the first step of not adding food throughout the entire bin the negative effects of this will be mitigated though as the worms will just avoid the hot areas - as long as it doesn't heat up the entire bin.
More surface area means more microorganisms can colonize the material and more room where the worms can start to eat. Again, this is not necessary, but will help a lot. You can increase surface area of the material you add by breaking/cutting it apart - most commonly and easily done with a blender.
If these other things are provided for and the worms aren't eating it, its probably for a good reason. Worms are very tiny but very advanced soil testers. It may be too acidic for them (citrus), too spicy (peppers), or have some chemical - natural or unnatural - that they don't like (I believe they don't eat potato peels for this reason). Maybe there is some sort of herbicide, or salt, or something on the material. Its hard to say and I would have to leave the detective work up to you to figure out what it may be.