It's important to cite your sources for three reasons:
You have to give credit to the persons who created the words or ideas that you've included in your own writing. If you include an idea, phrase, or sentence in your writing that is NOT your creating, you must cite the book or article in which you found that idea, phrase, or sentence.
Persons who read your work may wish to locate the book or article in which you found the idea, phrase, or sentence so they can read more about the ideas or concepts included in your writing. Citing your sources allows them to do just that.
You must avoid plagiarism. Plagiarism is taking someone else's ideas or words and including them in your work without crediting them. Citing your sources helps you avoid plagiarism. Plagiarism usually carries serious penalties, from a failing grade on the assignment to a failing grade for the course to expulsion from the university in particularly egregious cases.