Cook onion and squash in microwave. Place the squash in a large bowl. Add the cracker crumbs, milk, cheese, and onion, and stir well. Stir in eggs, salt, pepper, sugar, and butter, and pour into a greased 1-quart casserole. Bake at 350 degrees for 40 minutes.