Is there a way to automatically put my Android phone into silent mode while recharging?
You can use Tasker for this (Play Store link). Tasker can create macros that are run on certain triggers, such as connecting the phone to a charger.

An example of the necessary programming can be found here. Check the link for additional info, but here's the necessary part:

Create Profile "Sleep Mode"

Add Context Power
    Source: AC    //You can also set this to all when you
                  //charge your phone using USB.

Add Context Time
    From: 22:00
    To: 07:00
    Repeat: Off

Add Start Task
1.  Silent Mode
    Mode: On
2.  Variable Set
    Name: %SLEEPMODE
    To: 1

Add Exit Task
1.  Silent Mode
    Mode: Off
2.  Variable Clear
    Name: %SLEEPMODE