There are many different types of diets, some more effective than others from low intensity to high intensity. Some are designed to help lose weight and others designed to gain it and some for building muscle mass, others just to tone and sculpt the muscle.

All just as capable of working as the next, but whether it will work depends on you and how much you want to reach your goal.

For the best results for different goals I have listed the best ways to achieve those goals.

For weight loss:

Drink plenty of water.

Think smaller portions and avoid frequent fatty foods and cooking oils/butter/lard.

Healthy low fat complex carb breakfast, cereal or omelette.

Smaller portions of carbs and larger portions of vegetables is the main thing for this.
You need some carbohydrates (Complex carbohydrates like pasta or rice, preferably whole grain) so your body has energy to keep your metabolism working optimally.
A meat of some sort, preferably chicken, fish or lean steaks. Try to use little oil to cook if frying, boiling is best as no oil is needed.

Snack on legumes, fruit and veg such as apples or celery.

For muscle building:

Drink plenty of water.

Think low fat high protein.

Eat small portions of carbohydrates like pasta or rice, preferably whole grain.
Have with chicken, fish, pork or lean steaks of beef for the protein content for cell repair needed from training.

Snack on legumes if hungry.

For weight gain:

Drink plenty of water.

Think keeping it healthy so just have bigger portions of carbohydrates than usual.

Still try to stay away from bad or extra fats as they are unhealthy saturated fats.

Snacks can vary during weight gain, just think healthy so not too much cake, chocolate, crisps (chips in the USA) ect.