If you know the population standard deviation sigma, then you'd use the z score. Otherwise, you would use a t statistic. However, if n is large enough (usually n > 30), then you can approximate the T distribution with the normal Z distribution. Some stats textbooks will allow the use of a z score if n > 30. Though it will depend on your specific book and/or your teacher.