This question has been debated in great length, but there is no clear answer.
There are several clues in the episode indicating that Tony was killed:
* The previous episode contains a flashback to a scene from "Soprano Home Movies" in which Bobby and Tony discuss what it's like being killed, saying "in our line of work, it's always out there. You probably don't even hear it when it happens". Of course since Bobby does hear it happen when he is killed, this is meaningless. People point to it because Tony flashed back to it at the end of "The Blue Comet". He flashed back to it because he is holding the assault rifle that Bobby gave him for his birthday, and now Bobby is dead. Reading anything more than that into it is making things up out of thin air.
* The screen abruptly cuts to black and all sound mutes as opposed to the fade in all other episodes that keeps the soundtrack running (which goes hand in hand with the above-mentioned discussion). Of course there are other episodes that end without a soundtrack, including 6B's "Kennedy and Heidi". There are also several episodes that end with an abrupt cut to black, as oppossed to a fadeout. Again, reading more into it than what is there is simply conjecture.
* The person staring at Tony and walking to the bathroom is significant enough to be credited, with a special mention to his "Member's Only" jacket. "Member's Only" is the episode in which Tony got shot, and is a reference to being in the mob. We also have to remember that Eugene wore a Members Only jacket, a real one, with the Members Only lapel. The guy referred to as Member's Only Wearing Man is actually wearing a faux Member's Only jacket, a knockoff, an imitation. Note there is no Member's Only tag on the lapel. This could simply mean that this guy is a representative for Eugene, a "fake" Eugene, bearing some physical resemblance to him. Since Eugene killed himself rather than endanger Tony and both his families, it seems quite ludicrous to associate danger towards Tony with this character.
* A hitman walking into a bathroom to retrieve his weapon reminds of a famous scene from The Godfather. But the differences are numerous. In the GF, Michael is sitting with his intended victims, and Michael is most certainly not a hitman. This is the first action he has taken in his life which is illegal. It also makes zero sense that someone intending to kill Tony would hide a gun in the bathroom of a restaurant that no one knew they were going to until 20 minutes before they went there. It just doesn't add up.
* The scene has been edited in a way that builds up tension. And then the tension is cut off sharply, leaving you with a feeling of exhiliration - or disappointment for some, who desperately wish to "prove" that Tony was killed to give themselves closure. The show was never about closure, and anyone who doesn't know that clearly wasn't paying very close attention to the show.
* All of the patrons in the diner represent an event from previous episodes that involved killing someone. - This is just not true. The laughing couple, for example, designed to remind us of the laughing couple that drove AJ to quit Beansie's in his despair over Blanca, had nothing to do with killing anyone. This is just wrong.
However, there are also several things hinting that nothing happened to Tony:
* We never actually see anything happen other than suggestive editing - we don't even see a gun. Or to put it more simply, we do not see Tony die, therefore when the show ended, Tony was still alive.
* The lyrics of the infamous Journey song indicate that life goes on despite all the trouble.
* There was no reason for Tony to be killed - the hit on Phil had been sanctioned by the Lupertazzi Family. (even so this is discussable because there where many variables in the way the hit went down. Phil was killed in front of his family and other witnesses and his head got crushed by his own SUV. This method of killing may have angered the Lupertazzi Family prompting a possible violent retaliation.)
The general consensus that most people can agree with is that the last scene shows the audience how Tony is feeling every day: In an everyday situation like eating dinner, everybody around him could be out to kill him. He is constantly living in paranoia and the fear that anybody who looks at him or brushes past him could be a killer. Whenever anybody enters the diner, Tony looks up to glances up to see if that person is a threat. The last season has had an emphasis on the downside of the mob life - Johnny Sack dying in prison with no money, leaving his widow penniless, people even in high ranks getting killed, Tony killing his own nephew in a despicable way. The final scene shows the sad life of those who survive - living in constant fear, facing death or prison.
There have been talks about a Sopranos movie being made as well, which suggests Tony is still alive at the end.