I am starting an assistant professor job this fall. What do you recommend me to do during this summer before a tenure-clock starts? The school I will be working at is a low-ranked R1 university.

Some people said, "just enjoy and have fun right now. It would be the last time you would ever have such enough free time".

But others said, "You should do research as much as you can before the school starts because you would not have enough time to do research for the first year because you would be busy with teaching for the first time as an instructor. You should start thinking about writing grant proposals or turning your dissertation into peer-reviewed publications."

Both seem to sound right to me, but are actually very opposite suggestions.

What did you do before you started your tenure-track assistant professor job and after you graduated your PhD? What do you recommend me to do for this summer?
Take some time for you. If your dissertation is solid and ready to go...no time like the present to get started and get it published in a journal! As far as beginning a new research project - I think it depends on your area and your expectations for research (see below). 

Since you are teaching, take a look at fall semesters teaching responsibilities. I found it important to take the summer to update my syllabus, review new textbooks, update my learning management system (e.g. canvas, blackboard), and even prepare some presentations and lesson plans. Then I took a look at my semester and blocked out a day or half a day every week to write, read, &amp; research. I put deadlines for research conferences on the calendar and would back up however much time I needed to make sure the work was getting done. If you're mentoring undergraduate/graduate student research plan a weekly meeting with them and get it on the calendar. Then when the semester starts and the meeting requests start coming in, you already have your calendar ready to go. 

I have a majority teaching appointment, so I spend a lot of time on teaching. We have a large graduate program so most of my research is co-published. 

Once you get to campus, take advantage of meeting people in other programs and departments. Find others on campus who you might be able to collaborate with on a research project or grant. Find a mentor in your program! Even if it is not a formal mentor, just someone who you can visit with and talk to about what you are doing is a great help in getting settled. Meet with your department head and find out what your expectations for teaching and research are...for example at my institution, with my % of research, they recommend two research articles a year and grant applications. With my teaching % they want to see consistently "similar" or "high" student evaluations, teaching innovations, and improvements to courses based on student feedback.

I actually found my first year somewhat exciting. I was getting to teach courses that I enjoyed. I met people who had similar research interests and developed great collaborative projects and I found the best mentor around to help me navigate those first few years. 

Best of luck!!