I've been a member of both, but I voted for Sam's Club.
For me, it's all about the convenience. Right now, Sam's Club is most convenient in terms of location. While there is also a Costco nearby, the parking lot is a nightmare and is enough to scare me away.
As someone else said, Sam's membership is slightly cheaper (I think $5).
Product-wise, in my area, they are very similar in terms of selection and cost. The only thing I wish Sam's had that was as good as Costco are the salads. While Sam's has ready-to-go salads, the quality is not as good as Costco's, but it's a small thing.
The other big thing Costco has going for them in my area is a gas station with cheap gas! However, I know Sam's Club has gas stations in other states (like Las Vegas -- that's where we fill gas when we're there).
Sam's hours are also better, at least here in Hawaii. Costco closes early on Saturday, Sam's doesn't. Sam's business membership hours are better too, and it's pretty easy to qualify for a business membership here.