What does "й" mean?
What does "й" mean in the following sentence?
Хубавото на сандъка, който ми даде, е, че нощем ще й служи за къща.
Is it an alternate form of "ѝ"(to her, for her, her)?
Yes, you're right, because the sign "ѝ" doesn't appear in many keyboard sets, it's commonplace mistake to write "й" instead(or well, many would call it a personal preference). The official alternative though is to write "и" when there's no dedicated sign for "ѝ".