Visibility of products is set in the catalogue. So your product must be in a catalogue with the appropriate visibility settings.Find out how to add your product to a catalogue here and how to set the catalogue's visibility here.