Ocean City is overwhelmingly a summer destination. July and August are peak season — the beach and boardwalk are packed, prices are highest, and traffic on the Route 50 bridge from the mainland backs up for miles. If you want the beach without the crowds, late May, June, and September offer warm water and far fewer people.
Spring and autumn attract anglers; the offshore fishing for tuna and mahi-mahi is best from May through October. Winter is very quiet — most restaurants and attractions close, and the town goes back to being a working-class Maryland beach town rather than a resort.