I'm not sure if it can be used as a solid rule, but:
"Есть" can be used when you ask if something exists (or state that something exists).
- У тебя есть машина? = Do you have a car?
- Да(, у меня есть машина) = Yes(, I have a car.)
If the existence of something is obvious or well-known, and it's a specific trait of this object that is discussed, "есть" usually is omitted.
У него зеленые глаза = He has green eyes/His eyes are green ("У него есть зеленые глаза" would sound extremely awkward). "У тебя есть ... глаза?" also does not sound quite right. It's as if someone has a spare set of eyes and is questioned about it.
So these sentences differ slightly in nuances:
В этом поезде есть ресторан? - you don't know if a restaurant exists or not, so you use "есть" (=exist)
В этом поезде ресторан? - by emphasizing "этот" you demonstrate that you know there is a restaurant in one of these trains, but you don't know in which one exactly
В этом поезде хороший ресторан? - you know there's a restaurant, but you are interested if it's good (its trait)
etc..
Below are a few pointers about "быть/есть" from a textbook
(1) The verb быть ‘to be’ has no present tense in Russian:
Я русский - I am Russian
3то мой муж - This is my husband
(2) A dash may be used for emphasis:
Я русский, а он — нет - I am Russian and he is not
A dash also appears in definitions:
Москва — столица России - Moscow is the capital of Russia
(3) ‘It is’ has no equivalent in many impersonal expressions:
Интересно слушать радио - It is interesting to listen to the radio
Темнеет - It is getting dark
Холодно - It is cold
(4) The declarative ‘there is/are’ either has no equivalent in Russian or may be rendered by a dash:
Ha стене — картина - There is a picture on the wall
Alternatively, Ha стене есть картина. See (5).
(5) Есть, a relic of a former verb conjugation, may be used for emphasis. Есть is particularly common:
(i) In questions (and positive answers to questions):
— Сигареты есть? - Are there any cigarettes?
— Есть! - Yes, there are.
(ii) In contexts where the verb is heavily emphasized:
— Кем же ты хочешь быть? - What do you want to be, then?
— Кем есть — менеджером - ‘What I am, a manager.
— Нужно справедливое решениеl - We need an equitable solution.
— Наше решение и есть справедливое - Our solution is equitable.
Закон есть закон - The law is the law
(iii) When ‘to be’ means ‘to exist’:
Есть такие люди, которые не любят икру - There are people who do not like caviar
(iv) Есть is also found in definitions:
Прямая линия есть кратчайшее расстояние мaжду двумя точками - A straight line is the shortest distance between two points