Night Before a meet - Since the longest pool swimming race is under twenty minutes (the 1650) the sport of swimming is thought to be more of a sprinting activity and not an endurance activity. So carb loading the night before is generally not helpful. Athletes should eat a well balanced meal the night before a meet making sure to take in plenty of water. But having some pasta isn't a bad meal just make sure you have protein and salad along with it.
The morning of a meet - Carbs are necessary but the often over looked ingredient to a good breakfast is protein. Carbohydrates will provide you with the energy you need and protein will make sure that the athlete has a smoother energy profile. That means that the protein will help keep the athlete from having sudden energy lows.
After workout, an event, or an entire meet - A general rule for all athletes is eat something as soon as possible. One of the keys to recovery after an activity is to let the body know that it is ok to start the "recovering process" the best way to tell the body that is to eat something. Generally speaking an athlete would want to get carbs and protein in a 3:1 ratio. Having said that this ratio changes based on the body type and duration of the activity but 3:1 is a good general rule. The size of the meal depends on the event. An athlete only needs a few bites between events, but an entire meal after workout or a meet. Again water is very important, there is actually a specific ratio of water to "other stuff" that the body absorbs more quickly than just water or food alone. So always be sipping water.
Gaining or maintaining weight - One of the problems some athlete's have is maintaining their weight during training. Often times this can be solved as easily as having a sports drink to sip on during practice. One word of caution about this. Gatorade and other premixed commercial drinks are too concentrated for optimal absorption and can cause stomach aches. This is because their main focus is to taste good. Our general rule is to water down Gatorade - 1/2 water, 1/2 Gatorade, for optimal ratios. Also, avoid high fructose corn syrup as the sweetener in a sports drink (and in life in general) it is not as easily processed or used for energy as other sweeteners.
Cramps at practice - Everyone is different but generally speaking avoiding dairy or greasy foods before workout can help.
You are what you eat - Over the course of about 2 years most of your body has regenerated cells to take the place of the old ones. Your body does this with the food you eat. So remember that you body needs a variety of foods to cover all the different nutrients and vitamins to run perfectly. So a good rule to follow is to much of any one food isn't good. Keep mixing it up and stay away from candy, soft-drinks, and anything with Trans fats.
My disclaimer - I don't claim to be a nutritionist, in fact at all of the colleges that I have coached at our athletes used nutritionists. So if you find that something here doesn't work for you that is ok. Nutrition is often times a science of trial and error for each person, since each person is unique.