To play the chord D/F#, and pretty much anything that involves using my thumb to fret or mute, I usually keep the webbing between my thumb and index fingers wrapped around the neck, so I can bend my thumb over the top. I keep my hand/palm in pretty close contact to the neck- not tight, you don't have to squeeze.. it's hard to describe, but something like this:
Depending on the size and shape of your hand you are going to have to experiment to figure out what is comfortable for you. Some people either can't or don't like to use their thumb in this manner at all, so it's not mandatory.
I think a lot of it is personal preference and what feels comfortable to you. For that D/F# chord I would probably use my thumb to mute the A string as well as use it to play the F# note. I use the thumb to mute the E string when playing C, A or Amin open chords (or A power chord like the one you tabbed). I also use it to mute the E and A strings for an open D chord. Typically when I play any open position ("cowboy") chords I keep my thumb hanging over the fretboard to facilitate this muting. It's especially handy because these chords lend themselves to a more aggressive strumming style, so using the thumb to mute the unwanted strings means I can strum all the strings for all the chords.
I do have big hands though, so it might not be as easy for everyone. Also the angle you hold the guitar/neck will dictate how easy it is to use your thumb like that. I think generally it is advised to hold the neck at about a 45 degree angle between the floor and ceiling (see classical guitar posture). That helps when playing fast passages or intricate fingerings, but when trying to use the thumb for muting I find a lower angle is easier, closer to parallel with the floor.
I also mute with my thumb sometimes for single notes, because I can mute the lower strings with my left hand thumb, and mute the higher strings with the other fingers, then this allows me to strum all the strings but still play just a single note. So say I was playing D string 7th fret: I would mute the E and A with my thumb, then mute the G, B, and high E strings with my fingers that aren't fretting the note. This is a more advanced technique, but it works well in funk or rock guitar where you want add a percussive element to the notes you are playing. You get the note you want to ring out, but strumming the muted strings at the same time adds a nice effect. (The main riff of RHCP's "Can't Stop" is a great example of this style. The guitar player John Frusciante strums all the strings most of the time but he is just playing single notes. In addition to using his thumb to mute the E and A strings, he also frets the notes that are on the low E string with his thumb)
Finally, there is the Jimi Hendrix version of playing barre chords: for E-string root barre chords, he wouldn't barre with his index finger, he would play the root note on the low E string with his thumb, and play the rest of the chord with his other fingers. So for a chord like this:
He would use his thumb to play the low E string, usually mute the A string with the tip of thumb, then use ring finger to play the D string, middle finger to play the G string, and index to play the B and high E strings. This leaves his pinky free to play all those cool riffs he does around chords, playing rhythm and lead at the same time. See Little Wing intro for great examples of this (you can't really see it well in that video, but look at the tabs you can see what he is doing, and how it's essentially impossible to play that if you play your barre chords normally. A more modern example can be found in the verse of RHCP "Under the Bridge").
One more thing you might know already, the fingers you fret with are also useful for muting the strings below them. Say I am playing a Bmin barre chord:
In that case I would use my index finger to fret the 2nd fret on the A string, but leave the tip of that finger resting against the low E string, keeping it muted. Again, this way I can strum all the strings, and not worry about that low E ringing out.
These are some techniques that you don't need to worry about too much if you are still a beginner, but they can add a lot of options to what and how you play if you are looking for some variety.