Abbreviations after a name–such as Jr., Sr., and academic titles–are set off by commas. They begin with a capital letter and end with a period.
Do not use the abbreviations unless they follow the name.
Correct: William F. Buckley, Jr. Walter Judd, M.D.
Incorrect: The average M.D. sees forty patients day.
(Does not follow name)
Correct: The average medical doctor sees forty patients a day.
In a full sentence, each abbreviation after a name is set off by a comma both before and after. No comma is needed at the end if the sentence ends with the abbreviation.
Correct: The Hon. Rep. Walter Judd, M.D., represented a Minnesota district in the U.S. Congress.
See also Commas with Titles