In Pokémon GO, Star Pieces provide a 50 percent boost in the amount of Stardust you earn from all sources within a 30-minute period. Ideally, you want to use it smartly and combine as many different actions into that period to maximize the output. For example, you could wait to hatch a bunch of Pokémon Eggs, save your daily bonus and go and catch as many Pokémon at once during the 30 minutes. The only way to get a Star Piece at the moment is to buy it from the in-game shop.
Source: Nintendo Life