Quilts (and most ideally all the quilting materials before they are made into quilts) need to be washed. The only exceptions to this are those antique quilts good only for exhibitions and quilts that are not in good condition.
The advice of washing your quilt materials (main fabrics, batting, threads) before they are assembled into a quilt is important if you are not sure about them.
Washing the fabrics first before incorporating them into a quilt releases any excess dye from the fabric. (Colors in new fabrics tend to run at the first laundry sessions.) Washing also gives the fabric the chance to stretch into its natural worn shape.
Fabrics
The first consideration on washing is the fabric or fabrics your quilt is made of. Traditionally most quilts are made of 100% cotton or of cotton mixes that are very close to 100% cotton.
This is because cotton is a natural fiber, hardy and available in so many varieties of patterns and colors. (It is also the top choice in making clothes.)
Check next what type of material the thread and batting of your quilt are made of. Once you know, you would know the detergents to use and how to treat your quilt in the laundry process.
Detergents
Use only an unscented liquid-based, color-free detergent in your quilts. Do not use any detergent that has fabric softeners in them. Fabric softeners can damage the fabric fibers as can scents and dyes.
NEVER use bleach on the quilt. This does not only ruin the color, they will damage the fibers of the fabric as well.
Carefully read the detergents composition and follow religiously the instructions well. They may be harmless, but some additives in some can be harmful to the fabric when used regularly.
Washing proper
Fill the washing machine with warm water, never hot water. While it is filling up, add the detergent. Stir to make sure the detergent is fully dissolved.
Put in your quilt. Do the regular warm/cold water wash cycle.
Put the quilt in the machine and select a regular warm/cold water wash cycle. Finally, do the cold/cold water wash cycle minus the detergent.
If your quilt is made of delicate materials, air-dry it in an area out of the sun. This will keep the colors intact because sunlight can fade fabric colors.
Let your quilt have a regular tumble-dry if it is made of good quality fabrics. Do not wring your quilt. It might cause a permanent crease and stresses the quilts materials.
Hand washing quilts
You can do hand washing of your quilt if you are up to the hard work. Do it in a large bath tub. Fill it with enough water to submerge your quilt fully with an inch or two of water allowance.
Again, make sure the detergent is fully dissolved before stirring the quilt in the water with your hands. Let the machine do the laundry if you are not up to it.
When you are confident that your quilt can be washed and your fabric can take the stress, then you can have the peace of mind that your quilt will be in good condition for years.