Sure can be both an adjective (certain) and an adverb (certainly), while surely is only an adverb. After linking verbs like was, we use the adjective form sure, not the adverb surely. She was surely pretty is incorrect because linking verbs need adjectives, not adverbs.