Your versions are close but the particle 에 is not right.
에 is primarily used for the target or destination of an action (식당에 가다), and its cousin 에서 is for the source or originating place of an action (식당에서 나오다).
Since food being delicious is not an action but an attribute of the place, neither is appropriate.
They can be corrected as follows.
1. 학교 식당(의) 음식이 맛있어요: The food of/at the school cafeteria is delicious.
2. 음식은 학교 식당이 맛있어요: As for the food, the school cafeteria is good.
The possessive particle 의 in #1 corresponds to "of". It can often be omitted without changing the meaning.
"음식은 [학교 식당이 맛있어요]" (again not 에) is a construct unique to Korean. It first sets the primary topic (음식) and then gives more detail (학교 식당이 맛있어요). It can be understood as "Speaking of XX, YY is such and such". It is a common pattern used very widely, as in: 나는 키가 커, 제주도는 경치가 좋아, 이 집은 방이 네 개야, etc.