Piggy created the sundial so he could know what time it was. This was made because he thought it would make the island more civilized if all the boys could know the time.
Piggy thought if they could make a way to tell the time the boys would be more civilized and work better in shifts. Because they would have things they had back home.
Piggy wants to create a civilized life on the island and create different inventions to help them survive and be rescued from the island. He also wants to make the island as close as he can to how they lived before they got there. All he wants to do is live in peace.