Preheat oven to 350 degrees. Line a baking pan with foil.
To cook spaghetti squash in the oven: Using the tip of a sharp knife, pierce the squash in several places. Place on baking pan and bake for 1 hour and 15 minutes until tender. To cook the spaghetti squash in the microwave: Pierce the squash in several places with a fork. Place in microwave and cook for about 10 to 12 minutes, until soft. Let stand for 5 minutes or so afterward, to finish steaming.
Meanwhile, in a large nonstick pan, cook onions in olive oil, until tender. Add tomatoes, zucchini, basil, garlic, salt, and pepper. Bring to a boil, turn heat down to a simmer, cover and cook for 3 minutes. Uncover and cook for about 6-8 minutes, stirring often or until the zucchini is crisp-tender. Keep warm.
Once spaghetti squash is cooked, cool slightly and carefully slice in half. Remove seeds and discard. Use a fork to shred squash into long strands in a bowl.
To serve: Place the spaghetti squash on a serving platter or individual plates. Pour sauce over the squash. Garnish with Parmesan cheese, if desired.