I lost all my settings in one of the add-on I use.
I use TellMeWhen add-on and I have been using for quite a bit. I had around 30 groups.
I've just logged on WOW and realized that I've lost all of the configuration...
Does anyone know how I can go back AND prevent this from happening again?
The "WTF" folder in your WoW folder is where your user-specific-based addon configurations/settings and stuff are stored. If you messed with or deleted that folder and can't restore it (through recycle bin or something) it's probably lost. If it just disappeared out of the blue, not likely anyone can tell you what happened.
You could make a backup of the Interface/WTF folders after you re-do your configuration, if you want. Just copy them and rename them Interface_backup / WTF_backup or something. They can sit in the same folder as the originals. If something goes wrong delete the original WTF/Interface, copy the _backups, and rename the backup copies to WTF/Interface. Really that shouldn't be something that just happens out of nowhere, though, but it doesn't hurt anything to do it I guess.