You can say "帰っていいですよ；you may go home", and "帰っていいですか？；can I go home?" in a formal way. You can also say "帰っていいよ; you may go home"and "帰っていい?; can I go home？" in a casual way.
"帰っていい。" means "You may/can go home."
"帰っていい?" means "May/can I go home?".
I am not sure about the first one, but the second one means "It's okay if i come back(home)?" or more literally literally "If I come back(home), it's good?"