A list of how to get all of the Pieces of Heart in The Legend of Zelda: Skyward Sword.
Piece of Heart #1 - The Lumpy Pumpkin Chandelier
After you unlock the green column of light in the sky, you can fly to the Pumpkin Landing, which is east of the green column. Go into The Lumpy Pumpkin and go upstairs. Go to the railing near the chandelier, and do roll attacks into the railing until the chandelier falls. Go downstairs to get the Piece of Heart that fell off of the chandelier.
Piece of Heart #2 - Faron Woods
As you look for the Kikwis in Faron Woods, you can walk up a tree root coming out of the southwest side of the big tree. From there, go toward the tree and you will see a rope and a Piece of Heart. Walk across the rope to get it.
Piece of Heart #3 - Goddess Cube near Skyview Temple
The second Goddess Cube that you can find is just south of Skyview Temple in Faron Woods. Use a Skyward Strike on the cube, then go back to the sky and fly to the small island south of the green column of light to find the unlocked Goddess Chest. Open it to get a Piece of Heart.
Piece of Heart #4 - Skyview Temple
After you get the Beetle in Skyview Temple, use it to unlock the door so you can leave the small room where you fought the Stalfos. Then go to the north side of the big room and turn around to see a Piece of Heart behind the bars. Stand back and use the Beetle to fly through one of the small arches near the top of the stone structure in the middle of the room. There is a pink switch there. Hit it to open the bars, then go in and get the Piece of Heart.
Piece of Heart #5 - 15 Gratitude Crystals
After you collect at least 15 Gratitude Crystals, you can talk to Batreaux to get a Medium Wallet and a Piece of Heart.
Piece of Heart #6 - Eldin Volcano
In the southern part of Eldin Volcano, there are ledges to the east of a spine-shaped bridge. Climb these ledges and go south, then west (killing a Pyrup at the end) and drop down to the ledge to the west to find a Piece of Heart.
Piece of Heart #7 - Faron Woods
After you get the Bomb Bag in the Earth Temple, you can return to Faron Woods and go to the "In the Woods" Bird Statue, then go north from there to find a rock wall that you can bomb to reveal a Piece of Heart.
Piece of Heart #8 - Beedle's Island
This Piece of Heart is in a Goddess Chest that can be unlocked by a Goddess Cube in Lanayru Desert. After you reach the western part of the Desert Gorge area of Lanayru Desert, you can bomb the rocks on the northernmost pillar to reveal a crystal. Activate it with the Hook Beetle, then kill the Technoblins and talk to the robot next to the mine cart. After the robot moves out of the way of the mine cart, get into it. When it stops, use the Hook Beetle on the crystal in the wall to the east. Get back into the mine cart, face north and charge up a Skyward Strike, and use it to hit the Goddess Cube as the mine cart goes past. Then go to Beedle's Island and land on top of the tall part of the island. Open the chest there to get the Piece of Heart.
Piece of Heart #9 - Lanayru Desert
In Lanayru Desert, to the east of the building where you activated the Lightning Dial, there is a crack in the cliff wall that you can reach by walking on the submerged walkways that are marked on the map. Use a bomb to open the wall, then follow the path to the end to find a chest that contains a Piece of Heart.
Piece of Heart #10 - Pumm's Task
To get this Piece of Heart, you need to have gotten Piece of Heart #1 and done first Lumpy Pumpkin task and the second Lumpy Pumpkin task. After you seal the Imprisoned, you can go to the Pumpkin Landing to talk to Pumm and get your final task. Sleep in a bed on the first floor of the Lumpy Pumpkin until night, then talk to Pumm to play a duet with Kina. If you do a good enough job, you will get a Piece of Heart.
Piece of Heart #11 - Fun Fun Island
After you activate the Light Tower, you can go to Fun Fun Island in the southwestern sky and talk to Dodoh to find out that he has lost his Party Wheel. Fi can add it as a dowsing target. Fly into the yellow column of light and land at the Desert Entrance bird statue. Activate the crystal near the Bird Statue, then climb up the vines, and look for the narrow ledge against the wall that you can go across with your hands. From there, go down the ramp to find the Party Wheel. Go back to the sky and fly to Fun Fun Island to give Dodoh the party wheel. Then talk to Dodoh to play Dodoh's High Dive. If you can fall through all of the rings and land on the multicolored space, you will get a Piece of Heart.
Piece of Heart #12 - Skyloft Shed
There is a Goddess Cube on Eldin Volcano, on the eastern side of the easternmost steep slope, that unlocks a Goddess Cube Chest in a shed on Skyloft. After you obtain the Water Dragon's Scale, you can swim into a passageway in the lake in eastern Skyloft to enter that shed, where you can open the Goddess Cube Chest to get a Piece of Heart.
Piece of Heart #13 - Goddess Cube Chest
You need to obtain the Clawshots to get this Piece of Heart. In Faron Woods, go to the southeast root of the Great Tree and use the Clawshots on the target on the underside of the raised part of the root. Alternatively, you can try to jump down to this cube from the Great Tree Bird Statue. Just put a beacon on the southeast tree root, to help you position yourself correctly. The cube unlocks a chest On an island east of the yellow column of light. You will need to skydive through the hole in the top of the island. Then use the Clawshots on the wall target to reach the chest, which contains a Piece of Heart.
Piece of Heart #14 - Zelda's Room
You need to obtain the Clawshots to get this Piece of Heart. Go to Skyloft and sleep in a bed until night. Then go to the roof of the Knight Academy and go to the chimney. Use the Clawshots on the target in the top of the chimney. Let go and you will fall into a crawlspace. Crawl through and you will fall into Zelda's room. You can open the cupboard to get a Piece of Heart.
Piece of Heart #15 - Goddess Cube Chest
After you open the teeth of the Pirate Stronghold, go outside and turn around to see a Clawshot target on the wall. Use it, then use the next one farther up to reach the ledge with the Goddess Cube. Then return to Skyloft and go to the entrance of Waterfall Cave, and use the Clawshots on the ivy on the floating island, then use the Clawshots on the ivy on the next island, with the pool of water in it. The chest is on the south side of this island. It contains a Piece of Heart.
Piece of Heart #16 - Sandship
After you activate the Timeshift Stone on a mast of the Sandship, you can climb up the ladder on a mast, kill the Bokoblins that are attacking, and shoot the targets on the zip line mechanisms to make your way to the dial that the Bokoblin rotated to hide the Timeshift Stone. After you turn the dial to reveal the Timeshift Stone again, you can use another zip line to reach the east side of the ship, and use the Clawshots to go down the eastern mast and reach an area down below with a blue chest that contains a Piece of Heart.
Piece of Heart #17 - Pumpkin Pull
After you complete the Sandship, you can complete Fledge's quest. If you haven't given him any Stamina Potions, buy two Stamina Potions, then sleep in a bed in Skyloft until night, and visit him in his room to give him the potion. Then sleep in a bed until night and give him a second Stamina Potion. Then sleep in a bed until night and talk to him in his room to get Gratitude Crystals. Sleep in a bed until morning, and you can find Fledge in front of the Sparring Hall, where you can play his new Pumpkin Pull minigame. If you get 600 points or more, you get a Piece of Heart. You get a bonus for consecutive hits, so do your best not to miss.
Piece of Heart #18 - Rickety Coaster
After you finish the Sandship dungeon, you can play the Rickety Coaster Minigame. It is located near the Shipyard Bird Statue of Lanayru Sand Sea. Go into the east building (you can run past the Lizalfos) and talk to Gortram the Goron. You can pay 20 rupees, and there are two courses: "Scary!" and "Heart stopping!" If you can complete the "Heart stopping!" course in under 1:05, you get a Piece of Heart.
Piece of Heart #19 - Goddess Cube Chest
After you get the Fireshield Earrings and go to the Volcano Summit, you can go through the west exit to reach an area with a small pool of water. Skydive off of the northern ledge, aiming for the northwest platform that is visible on the map. Place a beacon there if needed. There is a Goddess Cube on that platform. It unlocks a chest inside the thunderhead on the large southwest island. The chest is on a small wooden ledge on the southwest side of the island. It contains a Piece of Heart.
Piece of Heart #20 - Fire Sanctuary
In the Fire Sanctuary, you will encounter a Mogma underground who tries to run away from you. When you catch him, he gives you a blue chest that you can open to get a Piece of Heart.
Piece of Heart #21 - Gorko's Requests
After you complete the Fire Sanctuary, you can find Gorko the Goron on the path between the Sealed Temple and the Faron Woods. If you talk to him, he asks you to show him different designs drawn on the nearby Goddess Wall. If the Goddess Wall is not there, you can make it reappear by saving and quitting, then resuming the game, or by leaving the area and coming back (e.g. by going back to the Sky and then returning to Gorko). After you draw the first shape that he has asked for, he will give you a Piece of Heart. For more information, read the Goddess Wall Guide.
Piece of Heart #22 - Volcano Summit Underground
Along the path between the Fire Sanctuary and the Volcano Summit cave, there are soft soil spots. After you get the Mogma Mitts in the Fire Sanctuary, you can burrow into one of these soft soil spots and go to the other spot of light in the underground to reach a cave that contains fairies and a Piece of Heart.
Piece of Heart #23 - Purchase from Beedle
If you purchase the Life Medal from Beedle's Airshop, Beedle will replace it with a Piece of Heart that you can purchase, starting with your next visit. It's expensive, but you can get a discount if you do a quest for Beedle after you defeat Bilocyte, so you might want to wait until then to purchase it.
Piece of Heart #24 - Thunder Dragon's Lightning Round
After you have cured the Thunder Dragon's illness, you can talk to him to take his Battle challenge, known as Thunder Dragon's Lightning Round, which is a boss rush. You can choose from all of the bosses that you have fought previously. After each successful battle, you will get rupees or a random treasure item, and the Thunder Dragon will ask if you want to continue, but he will pick the next boss that you have to fight, and you won't regain health between fights. If you stop after four consecutive wins, you get a Piece of Heart.