You can buy beer in Maryland on a Sunday, but not everywhere within the state. For example, in Baltimore City you can't, but in Frederick County and Carroll County you can.
Each county in Maryland is given the latitude to create its own liquor laws, so they vary considerably throughout the state. For example, you can't buy beer at a grocery store in Anne Arundel County, but you can in Talbot County. In some cases, liquor laws can even vary between localities in the same county. Some counties allow the sale of beer and wine on Sundays, but not liquor.