You can prevent students from viewing the gradebook.
In 'Course administration > Edit settings' of the left menu of Course page, set 'Show gradebook to students' to 'No' in Appearance.
You can only hide the scores of certain grade items.
In the 'Setup' tab, click 'Edit Settings' of the grade item which you want to hide and then click 'Hide'**.
(Note) For the quiz grade items, uncheck 'Marks' in 'Review options' of Edit settings page of Quiz administration.