I just moved to Manchester and I'm staying at a hostel. I booked a bed online via hostelworld.com. What bothers me is that a receptionist asked me to give her my debit card in order to ensure some sort of security. She wrote down the details of my debit card. Is that legal to do so?
It is legal and is a common practice. Hotels take your credit/debit card information in case there are additional charges (incidentals) billed to you during your stay, or to ensure you pay if you didn't pre-pay. Every hotel does it. If they just swiped it - the information is in the computer, but they still keep it.
You might see a pending charge from the hotel on your account. It is an "authorization", not a real charge. You should make sure they cancel it when you leave as to not hold funds on your account tied up unnecessarily.
As to your concerns - when you leave, request to take that note from the reception after you've paid your bill. Debit card transactions without a swiped card and typed-in PIN are considered credit card transactions (except that they're charged to your account immediately) and enjoy the same fraud protections. So unless you've given them your PIN as well (which you should never do), you're OK.