Dreaming about cookies can represent a number of different things in your life.
It all depends on your mood in the dream- if your mood was negative, it's possible that these are problems that are causing you lots of worry in your waking hours. If you were happy in the dream then these elements of your life could be bringing you contentment and joy right now.
If you were indulging on the cookies, it's possible that you are living life to the excess- which might not be bringing you the satisfaction you crave.
Try to remember what the cookie looked like- if it was highly decorated and filled with a number of ingredients- it's possible you need to dial things back whereas if the cookie was very plan, you may need to consider being a bit more lenient with yourself and embrace your inner child.
If you couldn't reach some cookies in your dream- maybe you feel you haven't reached all the goals you want to in life yet.
If someone took a cookie away from you- perhaps you are jealous of someone who appears to have everything you want. Or that person is reaping the rewards of your hard work and taking credit for it.
Baking cookies is generally accompanied by an optimistic feeling- it may mean that you are content and happy at present. It could also be that the person you were baking with is someone you have a deep connection with.
If you gave a cookie to someone, it's possible you think a lot of them and the simple act of baking could represent your work ethic- of working hard for everything you get in life.
If you were buying cookies in the dream then maybe you want to or are giving into some temptations in your waking hours.