There are two occasions. The first and the one that I believe you are inquiring about can be used as follows:
1) You use it as a way of saying "no problem" or "go ahead" when you answer a request.
For instance:
Mr X: "Would it be okay if I borrow your car for the weekend?"
My Y: "Be my guest."
It means,,, no problem, go ahead.
If we think a little deeper into it... Be my guest literally means: "be a guest at my home" // "let me accommodate you at my home". But when it is used in this "no problem, go ahead" kind of way, what we are really saying is: "let me accommodate your request".
It can, of course, be used a second way:
2) Just to say that somebody can stay at your home, as your guest.
eg.
Mr X: "I have nowhere to stay in London over the next week or so."
My Y: "That's no problem, you can be my guest. Feel free to stay at my house".
--
I'm quite certain you are referring to the first usage.
I hope this helps you. Please just post a comment if you want any further explanation and I will be happy to accommodate you. Be my guest :)