tests can be used to clarify your intentions and what you are attempting to build. It's best place when you are actually starting from a clean slate.
Just write enough code to make the test pass, no more no less. Refactor and repeat.
In recent years I've never written any new piece of code without test first and can not be any happier. Beside the confidence a test gives you, it really a great way to pin down your thoughts and write what makes them meterialize.