1. Why didn't you buy any books? This sentence is used when the other person was told to or expected to buy some books.
2. Why didn't you buy some books? As an example, the other person wanted to buy something, possibly as a gift, but (s)he didn't know what to buy and ended up not buying anything. Now you can say, 'Why didn't you buy some books?'
What's the difference in meaning between the above two sentences?
Thank you very much for your reply.