Technically the colors are natural, at least in that they are proteins produced by other animals (plankton and/or
anemone if I remember correctly). GloFish are just Zebrafish (Zebra Danios) that have had those genes that encode for such proteins spliced into their DNA. Subsequent generations carry those genes just like any other.
The original purpose was to create fish that would fluoresce under UV light in the presence of various pollutants, and also to create fish with various structures that fluoresce so as to be studied easier. The first step in that process was to create fish that always fluoresce under UV light, and once this was done it was pretty obvious that these could be profitable to the ornamental fish market.
Zebrafish are used extensively in scientific research and have been instrumental in the understanding of cancer, particularly in the process by which viruses and oncogenes can cause cancer.
For a fascinating history of the use of zebrafish in cancer research, check out this video at
MITWorld