By closing at the end of the month you can save in prepaid interest.
In contrast if you close at the beginning of the month, you will be paying more in prepaid interest. But you can effectively skip a month's payment. For example if you close on August 5, you will pay 26 days of prepaid interest, but your first month's payment won't be due until October 1st. Some lenders will give you a credit for those 5 days and expect a payment on September 1st. Ask your lender which option is available to you.
If you are purchasing a home be sure to consider how much time you will need to move into the new house. Some people prefer a mid-month closing so that you have a couple of weeks to move from your old home into your new home. Others prefer to close at the end of the month, and do it in one day. If you have a strong preference be sure to communicate that to you realtor and mortgage professional.
When refinancing, your closing date can be critical.
Many loan officers will tell you do not need to make your mortgage payment for the month your closing will be scheduled. The reason is that your credit score will not be affected if your payment is not over 30 days late, and your original lender will be paid in full at closing anyway. This advice is generally given to people doing a debt consolidation refinance, who are short of cash anyway.
However, if your closing is scheduled late in the month, like the 28th or 29th, an unforseen delay can frequently delay your closing 1,2 or even 3 or more days with a weekend. If the new lender checks your credit score again on your closing day, that 30 day late may have been reported and affected your score. Now, you may not qualify for the loan.
If your closing is scheduled in the latter part of the month, make your current mortgage payments on time.