When should you take vitamin D?

What do you need vitamin D for?