In most European countries your work is protected under copyright laws by the very moment intellectual property has been created in an artistic process (a bit simplified). This used to be different in the US, mostly because the focus on copyright is fundamentally different there. In practice though, especially since US copyright has been adjusted to that principle a few years ago, there's not so much of a difference any more.
Other people's advise is right though, the burden of proof may be upon you and depending on the quality of the (faux-)evidence of the opposing party, "soft evidence" (timestamps, postmarks etc.) may not be sufficient (even though it will be in numerous cases).
Alternatively to officially signing your work you can do this: Take a copy of your work (and eventual documentation) and send/bring it to a notary to have him store it and sign it off. You'll most probably have to pay for this service, but it's a viable alternative to signing your work up.
Also keep in mind that whatever you do, you'll never be 100% protected from claims, because if somebody is able to proof that he or she has created a certain melody or lyric before you, you're still tangible for claims under all circumstances.