Is it okay to use aluminium foil instead of parchment paper while baking cookies?
You CAN bake cookies on aluminum foil, but you should be aware that they will cook faster and the bottoms will brown more and get crispy.  I would suggest using a slightly lower temperature and briefer baking time. 

Coincidentally, King Arthur Flour just posted an image of cookies baked on a bare, dark-metal baking sheet (cookies on the LEFT), which will heat similarly to aluminum foil, vs. parchment on a lighter sheet (cookies on the right). 



These cookies were cooked with exactly the same time and temperature.

Why does this happen?
With parchment, the bottoms of the cookies get heated less than if they're on metal, and more of the heat comes from hot air passing over the top.  Aluminum and metal in general are excellent heat conductors, so they will pass a lot of heat to the bottoms of the cookies. Parchment is a reasonably effective insulator, so it will slow conduction of heat to the cookies' bottoms.