While both of these are chemical leavening agents, they react differently with various ingredients, creating different textures. You'll find that typically cookies just use baking soda. This creates that classic chewy texture. Baking powder results in a puffy caky texture. Baking powder is used in pumpkin cookie recipes that use more pureed pumpkin and result in a soft puffy cakey cookie.