It depends on the situation mostly but it's usually good practice to commit often. Some of the common scenarios where I commit is:
Though I commit often, I don't push the commits until I finish the task or if a colleague's work depends on yours. When I do push my commits, I deploy to a DEV server immediately for testing and changes can be done then and there. We go live every two or three days. This method works for rapidly building features or fixing bugs.
Of course, depending on your situation this can change but committing often is always a good practice because it allows you to keep track of what changes were made when there are lots of commits versus one large commit where you're hunting for the change you made.
Committing often also allows me to experiment with a feature, so even if it doesn't work out, I can roll back easily.