Taking care of and maintaining your melodica is extremely important. Instruments only perform well when they are in good working condition and tuned properly. Not only will care and maintenance ensure that your melodica sounds great but it will also extend the instruments life.
Always keep your melodica in a case or box when not using it. This will protect it from dust, dirt, pets, or your kids. Many melodicas come with a soft carrying case which is good for easy transport and helps keep it clean but consider getting a hard case as this will offer more protection against damage.
Melodicas are particularly sensitive to temperature changes and moisture. Cold or wet weather can have an adverse effect on the reeds, possibly causing condensation which will affect the sound. Keeping your melodica in a warm, dry place and letting it adjust for awhile to the outside environment before playing will help tremendously. Never leave your melodica in a hot car or anywhere the temperature might exceed 100 degrees, as this could literally melt the instrument.
Because the melodica is a reed instrument played by blowing air into it, moisture will naturally build up inside and periodically need to be removed. I recommend that you get into the habit of doing this every time your done playing. To do this simply open the moisture vent which is usually located at the end of the melodica and either blow through the mouthpiece (without pressing the keys) or shake the instrument vertically up and down until the moisture is all out. Also, if you use an air tube be sure to regularly shake out any moisture build up inside.
The good news is that melodicas generally need less tuning than most other free reed instruments. The bad news is that some melodicas have tuning issues right off the bat and tuning them is not quite as easy and straightforward as say a guitar or bass. Many people who play melodica will never tune it and aren't that concerned with a slight variation in pitches across the keyboard. It is completely up to you but I recommend that you at least know how to tune a melodica as eventually, like with most instruments you will have to tune it.
The first thing you will need is a tuner. I highly recommend a digital tuner or a strobe tuner as they are the most accurate and easy to use. The key thing to understand here is the concept of relative pitch. The idea is not to get the instrument in perfect tune, which is next to impossible, but to tune the keys so they are relatively close to pitch when compared to each other. The best way to do this is to first find out what your melodica's relative pitch is. Using the tuner determine what pitch the majority of the keys are in. If most of the keys are a little sharp than it's much easier to adjust the few that aren't to that pitch rather than change most of the keys to match the couple that are in pitch.
The next step is to prepare the melodica for tuning. Using tape, mark the keys you want to tune and when your able, mark the matching reeds also. This makes it much easier to keep track of what your doing and prevents you from accidentally re-tuning a good key.
You're now ready to open the melodica to access the reeds. Place the instrument face down on a clean table, you may want to use a towel or cloth underneath to prevent scratching. Unscrew the back of the instrument being careful to note which screws go where (some melodicas have different size screws). Once the back is off you will have access to the reeds on most models, however some melodicas may require that you remove more stuff to get to the reeds.
Tuning the melodica involves filing the reeds to change their pitch. The best tools for the job are small curved files, flat files are much harder to use. Most hobby shops and some hardware stores will carry these curved files. To lower or flatten the pitch, file from the back of the reed. To raise or sharpen the pitch, file from the front of the reed. Keep in mind that the closer you file to the ends of the reeds, the stronger the change in pitch will be. You can test the pitch by either plucking the reed with the tuner held close or by gently blowing over the reed. It's better to make small adjustments and work your way to the desired pitch than to make large ones and file too much. File gently and take your time.