Hi Angeliki,
You don't say which version of Moodle your are using, but I assume it is a fairly recent one. I do not know of a way you can get Moodle to automatically rename what a student submits. If you download and keep copies of their work, you can change/rename it when saving the download.
To save myself work, from the very first day of class, I teach my students how I want things named. In fact, I make it part of their grade and take off points if they do not correctly name anything they turn in. I require them to name everything starting with their name, what program they used to create the document, then the name of the assignment. For example a typical essay writing assignment written by me in Libre Office Write would be named: AlRachelsLOWriteSpringBreakEssay.odf (I also count off if they use spaces in file names so I don't get a bunch of annoying %20's in the filenames.)
If they resubmit an assignment, I require them to add a version number like so: AlRachelsLOWriteSpringBreakEssay2.odf
Hope this helps,
AL