Both sentences are slightly unnatural, in that I don't think we are very likely to ask that particular question. This may be a personal quirk, but, while I may say that something was delicious, I am more likely to ask if was good or tasty, or, more simply, how it tasted/was.
However, let's assume that your question is possible. If a colleague had been out for a meal at a good restaurant, we might ask, "Did you have something delicious?" If we use 'something', we are mentally restricting the idea, and therefore perhaps suggesting there there probably was something delicious. If we use 'anything', the idea is unrestricted, and there is less of a suggestion that there was something. With 'something' the speaker is perhaps expecting to be told what the delicious thing was. With 'anything' the speaker is making a more open enquiry, not knowing whether the answer will be 'yes' or 'no'