That is definitely not
something you want to do. It's important to use positive reinforcement with budgies, not punishment. Additionally, it can stress and traumatize a bird if they are sprayed with water against their wishes, and can make them depressed or aggressive.
Here's a link that will explain what positive reinforcement is: