Bring a large pot of salted water to a boil.
Add the pasta to the boiling water and cook according to package instructions.
During the last 2-3 minutes of pasta cooking, add the broccoli to the pot.
In a large skillet, heat the olive oil over medium heat.
Add minced garlic and red pepper flakes to the skillet.
Drain the pasta and broccoli, reserving 1 cup of pasta water.
Add the drained pasta and broccoli to the skillet, tossing gently.
Gradually add reserved pasta water if needed, and season with salt and pepper.
Serve hot with grated Parmesan cheese on top, if desired.