When is the tail tail of a comet visible?

When its' orbit brings it close enough to the Sun that the solar wind turns some of the ice into vapor.