我忘了吃饭“ = i forgot to have a meal (you state you _forgot_ to do it, not someone locked you in the room without giving a snack)
和
”我忘吃饭了“ = i forgot to have a meal (you state there was such action in that past that you forgot to have a meal, past simple)