Long post alert.....
I've done this trip more times than I care to remember - I used to leave St Andrews at 7am and be in Broadford by 4:30, so it's a long journey but not too bad.
I found that the cheapest way is to get a bus from St Andrews to Dundee, Megabus to Perth (about an hour), switch in Perth onto another Megabus to Inverness (just under 3 hours), then get onto a Citylink bus to Skye (roughly 3 hours, depending where on Skye you're going).
It's about two years since I've done the trip but it used to cost me about £25 return. Inverness-Skye one way is about £9 and there's no competition - for the rest it's Megabus prices, so you're talking a few pounds for the lot
As for where to stay - which end of the island will you be on? In the south end there are lots of hotels from **** to **, but they might be a bit hard to get to without a car. Not so sure about B&Bs (although there are probably plenty) but if you're on a budget and have a tent, just pitch it somewhere reasonable and you won't have any worries.
On the other hand, if you actually want to do anything, I guess you'll be heading north to Portree. There are loads of B&Bs and hotels there, booking ahead shouldn't be an issue.Just walk out of town towards Staffin (past Somerfield and The Bosville Hotel), and pretty much every house on that street is a B&B (nice views of the harbour). The cheapest option would probably be the hostel in the town centre, opposite the Clydesdale bank (about a 30 second walk from the bus station). Last time I was there it was painted snot-green, but they change it a lot. There's also another backpacker's hostel out near the Co-op.
Hope that's of some use!