Many good replies already...I'll add a couple of my favorites...
Maureen's Kitchen in Smithtown has great breakfast.
Glenn's Dinette in Babylon also good breakfast, as are most diners. I am also a fan of the deli egg breakfast, although I like mine at a place that uses Boar's Head sausage...sausage, egg, cheese on roll...yummy.
Flo's Luncheonette in Blue Point is a unique roadside stand that has been there a long time and has good "toasted sandwiches".
All-American Burger in Massapequa is a throw back to another time and has darn good burgers. Like their shakes as well and fries are fresh cut.
The pies at some of the farm stands others recommended have gotten average in recent years. They almost seem mass produced rather than the good fresh baked fare of old.
Sweet Magnolia's in Sayville...actually east of Sayville has a great Burger...one of the best on LI.
There are a lot of good diners, but also a lot of real average ones. You have to ask folks where you are which one is best. Don't give them all equal billing!
Smokin Al's in Bayshore is a relatively new and pretty decent BBQ place (please weigh this comment with the fact we are talking Long Island here...great by LI standards...average by others)
In Queens one of my favorites is Pearson's BBQ...this is BBQ that is good for anywhere! IT is a weird place, in the back of a bar...but it is some fine eating!
El Sitio, in Woodside Queens makes a great Cuban Sandwich. I always stop and pick up a few when I am heading to Shea to catch the Mets.
The Modern Snack Bar is a neat old place on 25 in Aquebogue (spelling??)... it sometimes draws a lot of elderly diners and has a ben-gay type odor...which is not too appetizing.
Oaxaca in Huntington was always a favorite, but after not having been there for a while, it was not as I remembered...haven't been back in a while.
Pizza is another thing that depends on who you ask. Almost everyone will tell you "there's a place right near where I live/work that is great"...so you have to ask around. When I leave LI for extended periods, I miss the pizza more than anything (sorry wife and kids...just kiddin')
Hellenic Snack Bar, which may be in Orient or East Marion...way out East...has been mentioned and is quite good, but there are other good places in Huntington and Sayville whose names escape me, but most likely involve the word "Aegean".
Snowflake Ice Cream in riverhead is real good and always has some interesting flavors. If you can't get there stand on a corner in a neighborhood where Mr. Softee rolls by. You can't miss his music and he makes a fine shake!
I hope you enjoy your visit...and don't leave hungry!