Male rainbowfish have longer dorsal (top) and anal (bottom) fins that are usually pointed on the end. Female rainbowfish have shorter fins that are rounded on the ends.
The first dorsal fin on male rainbowfish will touch or overlap the second dorsal fin. In females, the first dorsal fin will not touch the second dorsal fin.
When breeding, males produce a dorsal blaze, which is a coloured stripe that runs from the first dorsal fin down to his mouth. The dorsal blaze can be yellow, white or pink depending on species. Melanotaenia lacustris normally produce a yellow dorsal blaze.
Male fish get bigger (longer and higher in the body) than females. The really high body in rainbowfish does not normally occur until the fish are 2 years old, and the fish need a big tank to get really big. In tanks that are less than 24 inches high, the fish don't normally get very high in the body.
The fish in the picture is a male Melanotaenia lacustris, but not the best quality, it has a slightly unusual nose. However, it's still worth keeping, especially if you have a group of them so they can show off together.
The following link has information about all the known Australian and New Guinea rainbowfishes and has a nice picture of a male M. lacustris with its breeding stripe (dorsal blaze).
A website dedicated to Rainbowfishes of Australia and New Guinea