Good water quality is probably the most important thing your fish will need, the second most important is a diet that provides for their growth and maintenance. Bettas are able to get minerals like Calcium and Phosphorus from their water, which is why quality water is important, but minerals are also in the food they consume. There are three stages of a Bettas life and each requires a little different food at that stage.
After the eggs hatch the fry hang tail down in a nest and live off their egg sacks. After two days they become horizontal and the egg sack is used up. At that time very small food needs to be provided. Most people feed live foods, and our live food section will tell you all about Vinegar eels, micro worms and baby brine shrimp.
As the fry grow and get about a month of age, you will want to introduce foods that will start to put some size on them. Many people introduce grindle worms at this point, and others start to get the fish used to a pellet by feeding a powdered dry food. If you have both types of foods, getting the young fry used to eating different things at this point is going to make sure their nutritional needs are being met.
At about 12 weeks of age the Bettas enter the Juvie stage. This will take them up to about 5 months where they are considered adults. During this stage there is a lot of growth in both body and finnage. And you want to feed things that have a good fat content to give them plenty of energy during this phase. If you can culture them, white worms are loved by the fish and will provide lots of protein along with that higher fat content. Now is also the time to have them on a quality pellet. A quality pellet should be the base of any Betta diet. It will proved good protein as well as vitamins and minerals so the nutritional requirements are consistently met for the fish. If you want to treat your fish or add some variety, they will also relish live foods like daphnia and mosquito larvae or frozen foods like brine shrimp or blood worms. During this stage the fish should be fed at least twice a day, they can be fed more often if the feedings are smaller and that mimics the constant eating, in small proportions, the fish do in a natural environment.
If you are into DIY projects, the Juvie stage is also when many breeders will feed home made foods created with beef heart or fish. If you want to create and feed your own foods, you will find your fish love them. However, they are usually rich and will quickly affect your water quality for the worse. They are best fed several hours before a good water change. When creating your recipe, remember that although Bettas are meat eaters, the bugs and insects they eat have been feeding on plant material. So you have to include a bit of "green" in your recipes to provide balance nutrition. And DIY foods are best if fed in addition to a good pellet.
Once your fish reach adulthood they only need once a day feedings of a quality pellet for maintenance You may treat them to live or frozen foods like you did when they were younger, but they don't need the multiple feeding or they can get fatty deposits that are not good for their over all health. White worms can still be given as a treat, but these are too fatty to feed very often to any adult unless you are preparing the fish to be bred. Fish that are being prepared for breeding, even if adults, will need fed several times a day. White worms are good for conditioning breeders, but you still want to watch and not feed them too much or you run the risk of gaining fat instead of breeding condition.