In Windows 7, SSDs got excluded from the built-in defragment tool. SSDs doesn’t need to be defragged, as all data can be reached at the same time. And unnecessary writes can decrease a SSD’s lifespan.
In Windows 8, the defragment tool has been renamed to Optimise Drives and now includes SSDs. As far as I’ve found out, it seems Windows 8 is running TRIM on the whole drive. TRIM is a command that makes the SSD “clean up” its free area, so that the used memory cells marked as free is washed of their data. This ensures that the speed of the writing operations don’t slow down, as the area doesn’t have to be cleaned before data is written to it.