I'll add this as another answer. So far, all the other answers are addressing how to ask "Is it OK to eat here?" However, as you know, Japanese people are often indirect, so you might in fact say/hear this from the negative point of view.
ここで食べてはだめ/いけないんですか？ → Is it "bad" to eat here? (Should I not eat here?)
Taking it one step further, you might even assume it's not OK to eat here, and state that fact as a semi-suggestive question to confirm your assumption.
ここで食べてはだめ/いけないんですね？ → I shouldn't eat here, right? (It's "bad" to eat here, right?)
If you take the direct route by asking "is it OK?", you may come across as pushy or confrontational if they don't want you eating there. Even if it is OK to eat there, you may still leave a bit of a bad taste in their mouth by asking directly.
On the other hand, asking indirectly gives the impression that you'll politely and willingly comply with their request if they don't want you eating there.
- You: ここで食べてはだめですね？ → I shouldn't eat here, right?
- 店長: あぁ、はい。すみませんが。。。 → Um, yes. I'm sorry... (please don't eat there).
And if it is OK to eat there, asking this way will make you seem more humble, and they will likely gladly tell you to go ahead.
- You: ここで食べてはだめですね？
- 店長: いえいえいえ、全然大丈夫です。どうぞ！