Because of past PGL ban waves (and a potential future one), many are wondering if they can edit save files safely. The safest option is to simply not hack or to not use game sync, although some minor edits may be safe. The problem is that it is unclear on what the bans were based, and the Pokémon company hasn't exactly volunteered this information.
Here are the known causes of PGL bans:
Getting 999 of every item (it's possible the bans are from a sub-set of items)
Making illegal changes to Pokémon between game syncs
Illegal Pokédex entries
Items in the incorrect Bag Pocket
Changing anything in the save that is static (like OT, Gender, Language, etc.)
Getting all clothing (there's been mixed reports about this)
We have not received any reports of banning due to receiving hacked Pokémon in trades. Making other edits might be safe, but only as long as the result could have been accomplished without hacks given more effort.
By hacking your save file, you accept full responsibility of any consequences such as being banned. If you are banned, however, we would appreciate your input so we can learn more.
Thanks to everyone who posted in our previous threads about the bans for sharing their experiences, zenamez of GBAtemp for compiling the causes reported on GBAtemp, and to theSLAYER and Serebii for checking this information.
Image Source (Thanks to @\ from our IRC for suggesting this)