The pigs which are outer from atmosphere are tricky.
Getting 3 stars is not easy.
Send the first Space Egg around to the furthest stone pyramid. Activate it towards the bottom. The explosion should cause the pile of stones to fly up and to the left taking out the three little pigs in the bubble, while also inflicting quite a bit of damage to the rest of the level. Now use another Space Egg and activate it towards the top of the first stone pyramid to finish of the remaining pigs.